{"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":"80c4e191-59ba-54e3-b718-d3cee7c9d231","task_key":"default--v0~2e1~2e0~5fhf--80c4e191-59ba-54e3-b718-d3cee7c9d231","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 80c4e191-59ba-54e3-b718-d3cee7c9d231","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import collections\\nimport matplotlib.pyplot as plt\\ndef task_func(data):\\n\",\"complete_prompt\":\"import collections\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(data):\\n    \\\"\\\"\\\"\\n    Combine a list of dictionaries with the same keys (fruit names) into a single dictionary,\\n    calculate the total turnover for each fruit, and return a bar chart's axes with colors representing\\n    different fruits. The colors are selected from: 'red', 'yellow', 'green', 'blue', 'purple'. The function\\n    ensures that sales quantity must not be negative, throwing a ValueError if encountered.\\n\\n    Parameters:\\n    data (list): A list of dictionaries. The keys are fruit names and the values are sales quantities.\\n                 Sales quantity must not be negative.\\n\\n    Returns:\\n    total_sales (dict): A dictionary containing the total sales for each fruit.\\n    ax (matplotlib.container.BarContainer): A bar chart of total fruit sales, or None if data is empty\\n\\n    Requirements:\\n    - collections\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> sales, plot = task_func([{'apple': 10, 'banana': 15, 'cherry': 12},\\\\\\n                             {'apple': 12, 'banana': 20, 'cherry': 14},\\\\\\n                             {'apple': 15, 'banana': 18, 'cherry': 15},\\\\\\n                             {'apple': 11, 'banana': 17, 'cherry': 13}])\\n    >>> sales\\n    {'apple': 48, 'banana': 70, 'cherry': 54}\\n    >>> type(plot)\\n    <class 'matplotlib.container.BarContainer'>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Combine a list of dictionaries with the same keys (fruit names) into a single dictionary, calculate the total turnover for each fruit, and return a bar chart's axes with colors representing different fruits. The colors are selected from: 'red', 'yellow', 'green', 'blue', 'purple'. The function ensures that sales quantity must not be negative, throwing a ValueError if encountered.\\nThe function should output with:\\n    total_sales (dict): A dictionary containing the total sales for each fruit.\\n    ax (matplotlib.container.BarContainer): A bar chart of total fruit sales, or None if data is empty\\nYou should write self-contained code starting with:\\n```\\nimport collections\\nimport matplotlib.pyplot as plt\\ndef task_func(data):\\n```\",\"libs\":\"['collections', 'matplotlib']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}