{"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":"a5f59044-9380-5464-be46-1e4161947d7a","task_key":"default--v0~2e1~2e0~5fhf--a5f59044-9380-5464-be46-1e4161947d7a","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a5f59044-9380-5464-be46-1e4161947d7a","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nimport errno\\nimport shutil\\ndef task_func(filename, dest_dir):\\n\",\"complete_prompt\":\"import os\\nimport errno\\nimport shutil\\n\\ndef task_func(filename, dest_dir):\\n    \\\"\\\"\\\"\\n    Copy a file to a specified destination directory and clear its contents.\\n    This function takes in the path to a file and a destination directory path.\\n    It copies the file to the destination directory. Once the file is copied,\\n    the function will erase the content of the original file, leaving it empty.\\n\\n    Parameters:\\n    - filename (str): The path to the file to be copied and erased. This must be an\\n                      absolute path or relative to the current working directory.\\n    - dest_dir (str): The path to the destination directory where the file will be copied.\\n                      This must be an absolute path or relative to the current working directory.\\n                      The directory will be created if it does not exist.\\n\\n    Returns:\\n    - str: The absolute path to the copied file within the destination directory.\\n\\n    Requirements:\\n    - os\\n    - errno\\n    - shutil\\n    \\n    Raises:\\n    - OSError: If the destination directory cannot be created and does not exist, or if the file\\n               cannot be copied for reasons other than a pre-existing directory.\\n\\n    Examples:\\n    >>> task_func('/path/to/original/test.txt', '/path/to/destination')\\n    '/path/to/destination/test.txt'\\n\\n    Notes:\\n    - If the destination directory already contains a file with the same name, the function\\n      will overwrite that file without warning.\\n    - The original file will not be deleted from the filesystem, only its content will be cleared.\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Copy a file to a specified destination directory and clear its contents. This function takes in the path to a file and a destination directory path. It copies the file to the destination directory. Once the file is copied, the function will erase the content of the original file, leaving it empty.\\nNote that: Notes: If the destination directory already contains a file with the same name, the function will overwrite that file without warning. The original file will not be deleted from the filesystem, only its content will be cleared.\\nThe function should raise the exception for: OSError: If the destination directory cannot be created and does not exist, or if the file cannot be copied for reasons other than a pre-existing directory.\\nThe function should output with:\\n    str: The absolute path to the copied file within the destination directory.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nimport errno\\nimport shutil\\ndef task_func(filename, dest_dir):\\n```\",\"libs\":\"['shutil', 'errno', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}