ACL 2024findings19 citations

DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories

Jia Li, Ge Li, Yunfei Zhao, Yongmin Li, Huanyu Liu, Hao Zhu, Lecheng Wang, Kaibo Liu

Abstract

How to evaluate the coding abilities of Large Language Models (LLMs) remains an open question. We find that existing benchmarks are poorly aligned with real-world code repositories and are insufficient to evaluate the coding abilities of LLMs.To address the knowledge gap, we propose a new benchmark named DevEval, which has three advances. (1) DevEval aligns with real-world repositories in multiple dimensions, e.g., code and dependency distributions. (2) DevEval is annotated by 13 developers and contains comprehensive annotations (e.g., requirements, original repositories, reference code, and reference dependencies). (3) DevEval comprises 1,825 testing samples from 115 repositories, covering 10 popular domains (e.g., Internet, Database). Based on DevEval, we propose repository-level code generation and evaluate 8 popular LLMs on DevEval (e.g., gpt-4, gpt-3.5, StarCoder 2, DeepSeek Coder, CodeLLaMa). Our experiments reveal these LLMs’ coding abilities in real-world code repositories. For example, the highest Pass@1 of gpt-4 only is 53.04% in our experiments. We also analyze LLMs’ failed cases and summarize their shortcomings. We hope DevEval can facilitate the development of LLMs in real code repositories. DevEval, prompts, and LLMs’ predictions have been released.

BibTeX
@inproceedings{li-etal-2024-deveval,
    title = "{D}ev{E}val: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories",
    author = "Li, Jia  and
      Li, Ge  and
      Zhao, Yunfei  and
      Li, Yongmin  and
      Liu, Huanyu  and
      Zhu, Hao  and
      Wang, Lecheng  and
      Liu, Kaibo  and
      Fang, Zheng  and
      Wang, Lanshen  and
      Ding, Jiazheng  and
      Zhang, Xuanming  and
      Zhu, Yuqi  and
      Dong, Yihong  and
      Jin, Zhi  and
      Li, Binhua  and
      Huang, Fei  and
      Li, Yongbin  and
      Gu, Bin  and
      Yang, Mengfei",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2024",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-acl.214/",
    doi = "10.18653/v1/2024.findings-acl.214",
    pages = "3603--3614"
}
DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories · ACL 2024