{"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":"94f99440-bfb5-52d9-a6d3-c75b4e8adea3","task_key":"default--v0~2e1~2e0~5fhf--94f99440-bfb5-52d9-a6d3-c75b4e8adea3","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 94f99440-bfb5-52d9-a6d3-c75b4e8adea3","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nimport re\\nimport json\\nimport glob\\ndef task_func(directory_path: str) -> list:\\n\",\"complete_prompt\":\"import os\\nimport re\\nimport json\\nimport glob\\n\\n\\ndef task_func(directory_path: str) -> list:\\n    \\\"\\\"\\\"\\n    Protect all double quotes in all JSON files in the specified directory by prepending them with a double backslash.\\n    \\n    Functionality:\\n    - Reads each JSON file in the given directory.\\n    - Escapes the double quotes by prepending them with a double backslash.\\n    - Writes back the modified content to the respective JSON file.\\n    \\n    Parameters:\\n    - directory_path (str): Path to the directory containing JSON files.\\n    \\n    Returns:\\n    - list: A list of the processed JSON files.\\n    \\n    Requirements:\\n    - re\\n    - json\\n    - glob\\n    - os\\n\\n    Raises:\\n    - FileNotFoundError: If the specified directory does not exist.\\n    \\n    Example:\\n    >>> import tempfile\\n    >>> import json\\n    >>> directory = tempfile.mkdtemp()\\n    >>> with open(directory + \\\"/file1.json\\\", \\\"w\\\") as file:\\n    ...     json.dump({\\\"name\\\": \\\"John\\\", \\\"age\\\": 30, \\\"city\\\": \\\"New York\\\"}, file)\\n    >>> with open(directory + \\\"/file2.json\\\", \\\"w\\\") as file:\\n    ...     json.dump('{\\\"book\\\": \\\"Harry Potter\\\", \\\"author\\\": \\\"J.K. Rowling\\\", \\\"quote\\\": \\\"\\\\\\\\\\\"Magic\\\\\\\\\\\" is everywhere!\\\"}', file)\\n    >>> files = task_func(directory)\\n    >>> len(files)\\n    2\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Protect all double quotes in all JSON files in the specified directory by prepending them with a double backslash. Functionality: - Reads each JSON file in the given directory. - Escapes the double quotes by prepending them with a double backslash. - Writes back the modified content to the respective JSON file.\\nThe function should raise the exception for: FileNotFoundError: If the specified directory does not exist.\\nThe function should output with:\\n    list: A list of the processed JSON files.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nimport re\\nimport json\\nimport glob\\ndef task_func(directory_path: str) -> list:\\n```\",\"libs\":\"['glob', 'json', 're', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}