Projects per year
Abstract
In recent years, Large Language Models (LLMs) have dramatically advanced the performance of automated code translation, making their computational accuracy score reach up to over 80% on many previous benchmarks. However, most code samples in these benchmarks are short, standalone, statement/method-level, and algorithmic, which is not aligned with practical coding tasks. Therefore, it is still unknown the actual capability of LLMs in translating code samples written for daily development.
To achieve this, we construct a class-level code translation benchmark, ClassEval-T, and make the first attempt to extensively assess recent LLMs' performance on class-level code translation. ClassEval-T is extended from ClassEval, a well-known class-level Python code generation benchmark consisting of multiple practical coding topics, such as database operation and game design, and diverse contextual dependencies (e.g., fields, methods, and libraries). It cost us 360 person-hours to accomplish the manual migration to Java and C++ with complete code samples and associated test suites. Subsequently, we design three translation strategies (i.e., holistic, min-dependency, and standalone) for class-level code translations and evaluate eight recent LLMs of commercial, general, and code kinds in diverse families and sizes on ClassEval-T. Experimental results demonstrate a remarkable performance drop compared with the most widely studied method-level code translation benchmark, and obvious discrepancies among LLMs appear, showing the effectiveness of ClassEval-T in measuring recent LLMs. Afterwards, we further discuss the usage scenarios for diverse translation strategies and LLMs' ability to dependency awareness when translating class samples. Finally, 1,243 failure cases made by the best-performing LLM under test are thoroughly analyzed and categorized in this paper for practical guidance and future enlightenment. © 2025 Copyright held by the owner/author(s).
| Original language | English |
|---|---|
| Title of host publication | Proceedings of the ACM on Software Engineering |
| Editors | Luciano Baresi |
| Publisher | Association for Computing Machinery |
| Pages | 1421-1444 |
| Volume | 2 |
| Edition | ISSTA |
| ISBN (Electronic) | 2994-970X |
| DOIs | |
| Publication status | Published - Jul 2025 |
| Event | 34the ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2025 - Trondheim, Norway Duration: 25 Jun 2025 → 28 Jun 2025 https://conf.researchr.org/home/issta-2025 |
Publication series
| Name | Proceedings of the ACM on Software Engineering |
|---|---|
| Publisher | Association for Computing Machinery |
| Volume | 2 |
| ISSN (Electronic) | 2994-970X |
Conference
| Conference | 34the ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2025 |
|---|---|
| Abbreviated title | ISSTA 2025 |
| Place | Norway |
| City | Trondheim |
| Period | 25/06/25 → 28/06/25 |
| Internet address |
Bibliographical note
Research Unit(s) information for this publication is provided by the author(s) concerned.Funding
This work was partially supported by the National Natural Science Foundation of China (Grant Nos. U24B20149 and 62272271), the Natural Science Foundation of Shandong Province (Grant No. ZR2024QF093), the Taishan Scholars Program (Grant No. tsqn202408009), the Research Grants Council of Hong Kong, and the Industry Research Project funds (Grant Nos. 6000871, 6000796, 9229109, 9229098, 9220103, and 9229029).
Research Keywords
- Class-Level Code Translation
- Large Language Models
- Benchmark
RGC Funding Information
- RGC-funded
Fingerprint
Dive into the research topics of 'ClassEval-T: Evaluating Large Language Models in Class-Level Code Translation'. Together they form a unique fingerprint.-
TDG(CityU): Transforming Software Engineering Practice: Empowering Students through Generative AI Integration
Keung, J. W. (Principal Investigator / Project Coordinator)
1/08/24 → …
Project: Research
-
DON_RMG: Deep Probabilistic Reasoning and Statistical Analysis Using Deep-Learning – Phase 2 - RMGS
Keung, J. W. (Principal Investigator / Project Coordinator)
1/08/22 → …
Project: Research
-
DON_RMG: Deep Learning-based Technologies for Practical Data Analytics in Technological Innovation - RMGS
Keung, J. W. (Principal Investigator / Project Coordinator)
1/04/22 → …
Project: Research
Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver