Skip to main navigation Skip to search Skip to main content

ComplexCodeEval: A Benchmark for Evaluating Large Code Models on More Complex Code

  • Jia Feng
  • , Jiachen Liu
  • , Cuiyun Gao*
  • , Chun Yong Chong
  • , Chaozheng Wang
  • , Shan Gao
  • , Xin Xia
  • *Corresponding author for this work
  • University of Electronic Science and Technology of China
  • Harbin Institute of Technology Shenzhen
  • Huawei Hong Kong Research Center
  • Chinese University of Hong Kong
  • Huawei Technologies Co., Ltd.

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In recent years, with the widespread attention of academia and industry on the application of large language models (LLMs) to code-related tasks, an increasing number of large code models (LCMs) have been proposed and corresponding evaluation benchmarks have continually emerged. Although existing evaluation benchmarks are helpful for comparing different LCMs, they may not reflect the performance of LCMs in various development scenarios. Specifically, they might evaluate model performance in only one type of scenario (e.g., code generation or code completion), whereas real development contexts are diverse and may involve multiple tasks such as code generation, code completion, API recommendation, and test function generation. Additionally, the questions may not originate from actual development practices, failing to capture the programming challenges faced by developers during the development process.To address the aforementioned issues, we propose Complex-CodeEval, a new benchmark for evaluating the performance of LCMs in various development scenarios. ComplexCodeEval includes 3,897 Java samples from 1,055 high-star GitHub repositories and 7,184 Python samples from 2,107 high-star repositories. Each function sample in ComplexCodeEval contains multiple annotations (e.g., function signatures, docstrings and reference APIs) to accommodate various downstream tasks. Furthermore, to better reflect diverse development scenarios, each function sample is required to originate from a repository that depends on at least one selected library (based on popularity), and each function sample must invoke at least one API from the selected library. Additionally, each function sample has multiple timestamps to avoid data leakage. Based on ComplexCodeEval, we evaluate the performance of ten LCMs across four tasks (i.e., code generation, code completion, API recommendation, and test case generation) to explore their performance in complex development environments. Furthermore, we conduct an in-depth analysis of the impact of context and data leakage on model performance. Our experimental results reveal several key findings. For instance, LCMs exhibit varying performance across different coding tasks. Additionally, rich contextual information can greatly enhance the performance of LCMs. Moreover, using leaked data for evaluation may lead to an overestimation of model performance, resulting in inaccurate evaluation outcomes that deviate from the performance in practice.

Original languageEnglish
Title of host publicationProceedings - 2024 39th ACM/IEEE International Conference on Automated Software Engineering, ASE 2024
PublisherAssociation for Computing Machinery, Inc
Pages1895-1906
Number of pages12
ISBN (Electronic)9798400712487
DOIs
StatePublished - 27 Oct 2024
Externally publishedYes
Event39th ACM/IEEE International Conference on Automated Software Engineering, ASE 2024 - Sacramento, United States
Duration: 28 Oct 20241 Nov 2024

Publication series

NameProceedings - 2024 39th ACM/IEEE International Conference on Automated Software Engineering, ASE 2024

Conference

Conference39th ACM/IEEE International Conference on Automated Software Engineering, ASE 2024
Country/TerritoryUnited States
CitySacramento
Period28/10/241/11/24

Keywords

  • benchmark
  • code intelligence
  • large language models

Fingerprint

Dive into the research topics of 'ComplexCodeEval: A Benchmark for Evaluating Large Code Models on More Complex Code'. Together they form a unique fingerprint.

Cite this