{"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":"fc110b64-ae49-5911-9d57-aeab5a912da5","task_key":"default--v0~2e1~2e0~5fhf--fc110b64-ae49-5911-9d57-aeab5a912da5","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf fc110b64-ae49-5911-9d57-aeab5a912da5","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nimport os\\ndef task_func(request):\\n\",\"complete_prompt\":\"import re\\nimport os\\n\\n\\ndef task_func(request):\\n    \\\"\\\"\\\"\\n    Handles an HTTP GET request to retrieve a static file from the server.\\n\\n    This function processes an HTTP GET request, extracts the filename from it, checks the existence of the file\\n    in the server's directory, and returns an HTTP response. The response either contains the file content (if found) or an\\n    appropriate error message (if not found or if the request is invalid).\\n\\n    Parameters:\\n    - request (str): An HTTP GET request in string format. The expected format is \\\"GET /<filename> HTTP/1.1\\\".\\n\\n    Returns:\\n    - str: An HTTP response string, which includes the status code, content length (for 200 OK responses), and the file content\\n           or an error message.\\n\\n    Requirements:\\n    - os\\n    - re\\n\\n    Examples:\\n    >>> task_func(\\\"GET /test.txt HTTP/1.1\\\")\\n    \\\"HTTP/1.1 200 OK\\\\r\\\\nContent-Length: <size of test.txt>\\\\r\\\\n\\\\r\\\\n<contents of test.txt>\\\"\\n    >>> task_func(\\\"GET /nonexistent.txt HTTP/1.1\\\")\\n    \\\"HTTP/1.1 404 NOT FOUND\\\\r\\\\n\\\\r\\\\nFile Not Found\\\"\\n    >>> task_func(\\\"INVALID REQUEST\\\")\\n    \\\"HTTP/1.1 400 BAD REQUEST\\\\r\\\\n\\\\r\\\\nBad Request\\\"\\n    >>> task_func(\\\"GET /restricted.txt HTTP/1.1\\\") # Assuming an I/O error occurs\\n    \\\"HTTP/1.1 500 INTERNAL SERVER ERROR\\\\r\\\\n\\\\r\\\\nInternal Server Error\\\"\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Handles an HTTP GET request to retrieve a static file from the server. This function processes an HTTP GET request, extracts the filename from it, checks the existence of the file in the server's directory, and returns an HTTP response. The response either contains the file content (if found) or an appropriate error message (if not found or if the request is invalid).\\nThe function should output with:\\n    str: An HTTP response string, which includes the status code, content length (for 200 OK responses), and the file content\\n    or an error message.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nimport os\\ndef task_func(request):\\n```\",\"libs\":\"['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":[]}