ClassEval-T: Evaluating Large Language Models in Class-Level Code Translation
Not on the map. Why?
Abstract (arXiv)
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 analyzed and categorized in this paper for practical guidance and future enlightenment.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). First posted on arXiv 9 Nov 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 3; 2026: 5.
8 papers.
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repaircited by 3
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositoriescited by 2
- 2026CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corporacited by 1
- 2025Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligencecited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026CangjieBench: Benchmarking LLMs on a Low-Resource General-Purpose Programming Languagecited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translationcited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corpora20 Apr 2026
- 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories8 Apr 2026
- 2026CangjieBench: Benchmarking LLMs on a Low-Resource General-Purpose Programming Language15 Mar 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair19 Sep 2025
- 2025Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligence3 Jun 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025