{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/evocodebench-an-evolving-code-generation","title":"EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositories","arxiv_id":"2404.00599","date":"2024-03-31","proceeding":null,"authors":["Jia Li","Ge Li","Xuanming Zhang","Yihong Dong","Zhi Jin"],"abstract":"How to evaluate Large Language Models (LLMs) in code generation is an open question. Existing benchmarks demonstrate poor alignment with real-world code repositories and are insufficient to evaluate the coding abilities of LLMs. This paper proposes a new benchmark - EvoCodeBench to address the preceding problems, which has three primary advances. (1) EvoCodeBench aligns with real-world repositories in multiple dimensions, e.g., code distributions and dependency distributions. (2) EvoCodeBench offers comprehensive annotations (e.g., requirements, reference code, and reference dependencies), and robust evaluation metrics (e.g., Pass@k and Recall@k). (3) EvoCodeBench is an evolving benchmark to avoid data leakage. We build an automatic pipeline to update EvoCodeBench from the latest repositories. We release the first version - EvoCodeBench-2403, containing 275 samples from 25 real-world repositories. Based on EvoCodeBench, we propose repository-level code generation and evaluate 10 popular LLMs (e.g., gpt-4, gpt-3.5, DeepSeek Coder, StarCoder 2, CodeLLaMa, Gemma, and Qwen 1.5). Our experiments reveal the coding abilities of these LLMs in real-world repositories. For example, the highest Pass@1 of gpt-4 only is 20.73% in our experiments. We also analyze failed cases and summarize the shortcomings of existing LLMs in EvoCodeBench. We release EvoCodeBench, all prompts, and LLMs' completions for further community analysis.","url_abs":"https://arxiv.org/abs/2404.00599v1","url_pdf":"https://arxiv.org/pdf/2404.00599v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"evocodebench-an-evolving-code-generation","repo_url":"https://github.com/seketeam/evocodebench","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.00599","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.00599"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/seketeam/evocodebench","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":1,"ran_honours":3,"ran":10,"unverified":1},"by_repo_kind":{"official":{"samples":15,"ran":14,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"020a90b56537e147","entry":"adjust_indent","repo":"seketeam/evocodebench","repo_kind":"official","path":"pass_k.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/pass_k.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"020a90b56537e147"}},{"code_sha256_prefix":"41f57204e706d18f","entry":"compute_pass_at_k","repo":"seketeam/evocodebench","repo_kind":"official","path":"pass_k.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/pass_k.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"41f57204e706d18f"}},{"code_sha256_prefix":"b57d66d6dc47f45b","entry":"compute_recall","repo":"seketeam/evocodebench","repo_kind":"official","path":"parser/recall_k.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/parser/recall_k.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b57d66d6dc47f45b"}},{"code_sha256_prefix":"e6083effdcd822ef","entry":"count_indent","repo":"seketeam/evocodebench","repo_kind":"official","path":"utils.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e6083effdcd822ef"}},{"code_sha256_prefix":"fb2bbc95a2bfbc79","entry":"count_indent","repo":"seketeam/evocodebench","repo_kind":"official","path":"prompt/process_completion.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/prompt/process_completion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fb2bbc95a2bfbc79"}},{"code_sha256_prefix":"1e451f11c8932b9f","entry":"execution_tests","repo":"seketeam/evocodebench","repo_kind":"official","path":"pass_k.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/pass_k.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1e451f11c8932b9f"}},{"code_sha256_prefix":"aa151466ba7abc12","entry":"get_module_name","repo":"seketeam/evocodebench","repo_kind":"official","path":"parser/pyan_zyf_v2/anutils.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/parser/pyan_zyf_v2/anutils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa151466ba7abc12"}},{"code_sha256_prefix":"9b6c4ca7d09044ef","entry":"head","repo":"seketeam/evocodebench","repo_kind":"official","path":"parser/pyan_zyf_v2/anutils.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/parser/pyan_zyf_v2/anutils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9b6c4ca7d09044ef"}},{"code_sha256_prefix":"4582b8be0cf47287","entry":"load_api","repo":"seketeam/evocodebench","repo_kind":"official","path":"gpt_inference.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/gpt_inference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4582b8be0cf47287"}},{"code_sha256_prefix":"d6407246571e12e2","entry":"load_file","repo":"seketeam/evocodebench","repo_kind":"official","path":"gpt_inference.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/gpt_inference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d6407246571e12e2"}},{"code_sha256_prefix":"dbc6dc84387eb165","entry":"load_json_data","repo":"seketeam/evocodebench","repo_kind":"official","path":"utils.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dbc6dc84387eb165"}},{"code_sha256_prefix":"82e52f3a9b3bc119","entry":"produce_prompt","repo":"seketeam/evocodebench","repo_kind":"official","path":"make_prompt.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/make_prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"82e52f3a9b3bc119"}},{"code_sha256_prefix":"b3194a8fcb5677f4","entry":"retrieve_context_length","repo":"seketeam/evocodebench","repo_kind":"official","path":"LM_inference.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/LM_inference.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b3194a8fcb5677f4"}},{"code_sha256_prefix":"afdab5980a879713","entry":"retrieve_special_ids","repo":"seketeam/evocodebench","repo_kind":"official","path":"LM_inference.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/LM_inference.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"afdab5980a879713"}},{"code_sha256_prefix":"0999d7eb180157c0","entry":"tail","repo":"seketeam/evocodebench","repo_kind":"official","path":"parser/pyan_zyf_v2/anutils.py","file_url":"https://github.com/seketeam/evocodebench/blob/HEAD/parser/pyan_zyf_v2/anutils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0999d7eb180157c0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}