JavaBench: A Benchmark of Object-Oriented Code Generation for Evaluating Large Language Models
Code generation benchmarks such as HumanEval are widely adopted to evaluate LLMs' capabilities. However, after consolidating the latest 24 benchmarks, we noticed three significant imbalances. First, imbalanced programming language. 95.8% of benchmarks involve Python, while only 5 benchmarks involve Java, resulting in an insufficient understanding of LLMs' capability to generate Java code. Second, imbalanced code granularity. Function-/statement-level benchmarks account for over 83.3% of benchmarks. Only a mere handful extends to class-/project-levels, and all are limited to Python. Third, lacking advanced features. Existing benchmarks primarily assess basic coding skills (e.g., variables, operators, and control structures), while overlooking advanced Object-Oriented Programming (OOP) features (i.e., encapsulation, inheritance, and polymorphism). Considering the prevalence of these advanced features in real-world Java project development, constructing benchmarks to test LLMs on handling OOP features is necessary.
Authors
- Shing-Chi Cheung (ORCID: https://orcid.org/0000-0002-3508-7172)
- Jiarong Wu (ORCID: https://orcid.org/0000-0001-6126-303X)
- Chang Xu (ORCID: https://orcid.org/0000-0002-6299-4704)
- Jialun Cao (ORCID: https://orcid.org/0000-0003-4892-6294)
- Zhiyong Chen
Institutions
- Hong Kong University of Science and Technology (HK)
- Nanjing University (CN)
Publication Details
- Published
- 2024-10-18
- DOI
- https://doi.org/10.1145/3691620.3695470
- Citations
- 9
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 3.13