{"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":"d18e437c-871e-53ea-9311-4f7453cbca47","task_key":"default--v0~2e1~2e0~5fhf--d18e437c-871e-53ea-9311-4f7453cbca47","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf d18e437c-871e-53ea-9311-4f7453cbca47","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import json\\nfrom glob import glob\\ndef task_func(directory, string):\\n\",\"complete_prompt\":\"import json\\nfrom glob import glob\\n\\n\\ndef task_func(directory, string):\\n    \\\"\\\"\\\"\\n    Search for a specific string within the JSON data of files in a given directory and its subdirectories.\\n\\n    This function recursively scans the specified directory for JSON files, then checks each file to see if \\n    the given string is present within the JSON data structure.\\n\\n    Parameters:\\n    directory (str): The directory path where the search should be performed.\\n    string (str): The string to search for within the JSON data of the files.\\n\\n    Returns:\\n    list: A list of file paths (str) containing the string within their JSON data.\\n\\n    Requirements:\\n    - json\\n    - pathlib\\n    - glob\\n\\n    Note:\\n    - The string search is case-sensitive and looks for a match within the structure of the JSON data, not \\n    just as a substring in the file content.\\n    - If the directory does not contain any JSON files or if no JSON files contain the string, an empty list \\n    is returned.\\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, \\\"book\\\")\\n    >>> len(files)\\n    1\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Search for a specific string within the JSON data of files in a given directory and its subdirectories. This function recursively scans the specified directory for JSON files, then checks each file to see if the given string is present within the JSON data structure.\\nNote that: The string search is case-sensitive and looks for a match within the structure of the JSON data, not just as a substring in the file content. If the directory does not contain any JSON files or if no JSON files contain the string, an empty list is returned.\\nThe function should output with:\\n    list: A list of file paths (str) containing the string within their JSON data.\\nYou should write self-contained code starting with:\\n```\\nimport json\\nfrom glob import glob\\ndef task_func(directory, string):\\n```\",\"libs\":\"['glob', 'json']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}