{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"31fba451-22bb-5308-b5e8-6df402c6de09","task_key":"default--v0~2e1~2e0~5fhf--31fba451-22bb-5308-b5e8-6df402c6de09","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 31fba451-22bb-5308-b5e8-6df402c6de09","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import urllib.request\\nimport zipfile\\nimport os\\nimport urllib.error\\ndef task_func(\\n    url: str,\\n    save_path: str = \\\"downloaded_file.zip\\\",\\n    extract_path: str = \\\"extracted_files\\\",\\n) -> str:\\n\",\"complete_prompt\":\"import urllib.request\\nimport zipfile\\nimport os\\nimport urllib.error\\n\\n\\ndef task_func(\\n    url: str,\\n    save_path: str = \\\"downloaded_file.zip\\\",\\n    extract_path: str = \\\"extracted_files\\\",\\n) -> str:\\n    \\\"\\\"\\\"\\n    Downloads, extracts, and deletes a ZIP file from a specified URL.\\n\\n    The function includes comprehensive error handling to manage issues such as invalid URLs, unreachable servers, corrupted ZIP files, and file I/O errors. In the event of a failure, it provides a descriptive error message.\\n\\n    Parameters:\\n    - url (str): The URL of the ZIP file to be downloaded.\\n    - save_path (str, optional): The local file path where the ZIP file will be saved temporarily. Defaults to 'downloaded_file.zip'.\\n    - extract_path (str, optional): The directory where the ZIP file's contents will be extracted. Defaults to 'extracted_files'.\\n\\n    Returns:\\n    - str: The path to the directory where the ZIP file's contents have been extracted. Returns an error message in case of failure.\\n\\n    Raises:\\n    - urllib.error.URLError: If the URL is invalid or the server cannot be reached. \\n    In this case, the function returns a string in the format \\\"URL Error: [error reason]\\\".\\n\\n    Requirements:\\n    - urllib\\n    - zipfile\\n    - os\\n    - urllib\\n\\n    Example:\\n    >>> extracted_path = task_func('http://www.example.com/data.zip')\\n    >>> print(extracted_path)\\n    'extracted_files'\\n\\n\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Downloads, extracts, and deletes a ZIP file from a specified URL. The function includes comprehensive error handling to manage issues such as invalid URLs, unreachable servers, corrupted ZIP files, and file I/O errors. In the event of a failure, it provides a descriptive error message.\\nThe function should raise the exception for: urllib.error.URLError: If the URL is invalid or the server cannot be reached. In this case, the function returns a string in the format \\\"URL Error: [error reason]\\\".\\nThe function should output with:\\n    str: The path to the directory where the ZIP file's contents have been extracted. Returns an error message in case of failure.\\nYou should write self-contained code starting with:\\n```\\nimport urllib.request\\nimport zipfile\\nimport os\\nimport urllib.error\\ndef task_func(\\n    url: str,\\n    save_path: str = \\\"downloaded_file.zip\\\",\\n    extract_path: str = \\\"extracted_files\\\",\\n) -> str:\\n```\",\"libs\":\"['urllib', 'zipfile', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}