{"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":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"0a8558ac-f627-591d-a2e7-0be2ca3e9dee","task_key":"default--v0~2e1~2e0~5fhf--0a8558ac-f627-591d-a2e7-0be2ca3e9dee","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 0a8558ac-f627-591d-a2e7-0be2ca3e9dee","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import json\\nimport os\\nimport re\\ndef task_func(\\n    file_path,\\n    attribute,\\n    INPUT_JSON={\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"properties\\\": {\\n            \\\"name\\\": {\\\"type\\\": str},  \\n            \\\"age\\\": {\\\"type\\\": int},   \\n            \\\"email\\\": {\\\"type\\\": str}  \\n        },\\n        \\\"required\\\": [\\\"name\\\", \\\"age\\\", \\\"email\\\"]\\n    },\\n    EMAIL_REGEX=r\\\"^[a-z0-9]+[\\\\._]?[a-z0-9]+[@]\\\\w+[.]\\\\w{2,3}$\\\"):\\n\",\"complete_prompt\":\"import json\\nimport os\\nimport re\\n\\ndef task_func(\\n    file_path,\\n    attribute,\\n    INPUT_JSON={\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"properties\\\": {\\n            \\\"name\\\": {\\\"type\\\": str},  \\n            \\\"age\\\": {\\\"type\\\": int},   \\n            \\\"email\\\": {\\\"type\\\": str}  \\n        },\\n        \\\"required\\\": [\\\"name\\\", \\\"age\\\", \\\"email\\\"]\\n    },\\n    EMAIL_REGEX=r\\\"^[a-z0-9]+[\\\\._]?[a-z0-9]+[@]\\\\w+[.]\\\\w{2,3}$\\\"):\\n    \\\"\\\"\\\"\\n    Validate the structure and contents of a JSON file against predefined schema rules and retrieve a specified attribute from the JSON object. Ensures that all required fields exist, match their defined types, and checks the validity of the email format using a regular expression.\\n    \\n    Parameters:\\n    file_path (str): The path to the JSON file.\\n    attribute (str): The attribute to retrieve from the JSON object.\\n    INPUT_JSON (dict): The input json to validate. The default value is:\\n    '{\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"properties\\\": {\\n            \\\"name\\\": {\\\"type\\\": str},  \\n            \\\"age\\\": {\\\"type\\\": int},   \\n            \\\"email\\\": {\\\"type\\\": str}  \\n        },\\n        \\\"required\\\": [\\\"name\\\", \\\"age\\\", \\\"email\\\"]\\n    }'.\\n    EMAIL_REGEX (str): The regex used to check the email validity. Default to 'r\\\"^[a-z0-9]+[\\\\._]?[a-z0-9]+[@]\\\\w+[.]\\\\w{2,3}$\\\")'\\n\\n    Returns:\\n    Any: The value of the specified attribute, consistent with the type defined in the JSON schema.\\n\\n    Requirements:\\n    - json\\n    - os\\n    - re\\n\\n    Errors:\\n    - Raises ValueError if the file does not exist, required attributes are missing, types do not match, or the email format is invalid.\\n\\n    Example:\\n    >>> task_func('/path/to/file.json', 'email')\\n    'john.doe@example.com'\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Validate the structure and contents of a JSON file against predefined schema rules and retrieve a specified attribute from the JSON object. Ensures that all required fields exist, match their defined types, and checks the validity of the email format using a regular expression. Errors: - Raises ValueError if the file does not exist, required attributes are missing, types do not match, or the email format is invalid.\\nThe function should output with:\\n    Any: The value of the specified attribute, consistent with the type defined in the JSON schema.\\nYou should write self-contained code starting with:\\n```\\nimport json\\nimport os\\nimport re\\ndef task_func(\\n    file_path,\\n    attribute,\\n    INPUT_JSON={\\n        \\\"type\\\": \\\"object\\\",\\n        \\\"properties\\\": {\\n            \\\"name\\\": {\\\"type\\\": str},  \\n            \\\"age\\\": {\\\"type\\\": int},   \\n            \\\"email\\\": {\\\"type\\\": str}  \\n        },\\n        \\\"required\\\": [\\\"name\\\", \\\"age\\\", \\\"email\\\"]\\n    },\\n    EMAIL_REGEX=r\\\"^[a-z0-9]+[\\\\._]?[a-z0-9]+[@]\\\\w+[.]\\\\w{2,3}$\\\"):\\n```\",\"libs\":\"['json', 're', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}