To evaluate the repository-level code generation capabilities of Large Language Models (LLMs) in complex real-world software development scenarios, many evaluation methods have been developed. These methods typically leverage contextual code from the latest version of a project to assist LLMs in accurately generating the desired function. However, such evaluation methods fail to consider the dynamic evolution of software projects over time, which we refer to as evolution-ignored settings. This in turn results in inaccurate evaluation of LLMs' performance. In this paper, we conduct an empirical study to deeply understand LLMs' code generation performance within settings that reflect the evolution nature of software development. To achieve this, we first construct an evolution-aware repository-level code generation dataset, namely HumanEvo, equipped with an automated execution-based evaluation tool. Second, we manually categorize HumanEvo according to dependency levels to more comprehensively analyze the model's performance in generating functions with different dependency levels. Third, we conduct extensive experiments on HumanEvo with seven representative and diverse LLMs to verify the effectiveness of the proposed benchmark. We obtain several important findings through our experimental study. For example, we find that previous evolution-ignored evaluation methods result in inflated performance of LLMs, with performance overestimations ranging from 10.0% to 61.1% under different context acquisition methods, compared to the evolution-aware evaluation approach. Based on the findings, we give actionable suggestions for more realistic evaluation of LLMs on code generation. We also build a shared evolution-aware code generation toolbox to facilitate future research.
A Scalable Benchmark for Repository-Oriented Long-Horizon Conversational Context Management
State Key Laboratory of Complex & Critical Software Environment, School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院复杂与关键软件环境国家重点实验室)
RepoDebug: Repository-Level Multi-Task and Multi-Language Debugging Evaluation of Large Language Models
School of Computer Science and Engineering, Beihang University(北京航空航天大学计算机科学与工程学院);East China Normal University(华东师范大学);School of Computer Science and Technology, Beijing Institute of Technology(北京理工大学计算机科学与技术学院);Baidu Inc.(百度公司)
Contextualized Code Pretraining for Code Generation
Key Lab of HCST (PKU), MOE(高性能计算技术教育部重点实验室;计算机科学与技术学院,北京大学);SCS, Peking University(计算机科学与技术的学院,北京航空航天大学);School of Computer Science & Technology, Beihang University(空间信息集成系统国家重点实验室,中国科学院软件研究所);National Key Laboratory of Space Integrated Information System, Institute of Software Chinese Academy of Sciences(互联网信息协同深圳市重点实验室,哈尔滨工业大学(深圳));Shenzhen Key Laboratory of Internet Information Collaboration, Harbin Institute of Technology, Shenzhen
CodeSpecBench: Benchmarking LLMs for Executable Behavioral Specification Generation
The Hong Kong Polytechnic University(香港理工大学);University of Edinburgh(爱丁堡大学);UCL(伦敦大学学院);CUHK (SZ)(香港中文大学(深圳));SUTD(新加坡科技设计大学);HKUST(香港科技大学);CUHK(香港中文大学);HKUST (GZ)(香港科技大学(广州))
ResearchEnvBench: Benchmarking Agents on Environment Synthesis for Research Code Execution
Institute of Trustworthy Embodied AI(可信具身AI研究院);Shanghai Innovation Institution(上海创新机构);Shanghai Key Laboratory of Multimodal Embodied AI(上海多模态具身AI重点实验室);College of Computer Science and Artificial Intelligence(计算机科学与人工智能学院);OpenMOSS;Wuhan University(武汉大学);Nanjing University(南京大学);Jilin University(吉林大学)