An Extensive Empirical Study on Code Translation Technique

📅 2026-08-21
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
研究通过比较学习型方法和大语言模型在不同编程语言间的方法级和类级代码翻译性能,解决自动代码翻译技术的相对优势与局限性问题。
📝 Abstract
Automated code translation is increasingly important for software evolution, yet the relative strengths and limitations of learning-based and large language model (LLM)-based techniques remain insufficiently understood. To address this gap, we conduct a large-scale empirical study comparing representative code translation techniques across methodological paradigms and translation granularities. We evaluate learning-based methods, LLM-based methods, and general-purpose LLMs on multilingual method-level and class-level benchmarks involving multiple programming languages. Our analysis considers executable correctness, code similarity, translation direction, translation granularity, and failure patterns. The results show that LLMs and LLM-based methods generally outperform learning-based methods in method-level correctness, although similarity metrics alone do not reliably reflect functional correctness. Translation direction substantially affects performance, particularly when translating between languages with different type-system characteristics. Class-level translation remains considerably more difficult than method-level translation because it requires preserving global semantics, interfaces, member relationships, and cross-method dependencies. Our error analysis further shows that static semantic errors and logical errors are the primary challenges in existing code translation systems. These findings provide empirical evidence and practical guidance for developing more robust, type-aware, structure-aware, and context-aware code translation techniques.
Problem

Research questions and friction points this paper is trying to address.

code translation
learning-based methods
large language models
translation granularity
executable correctness
Innovation

Methods, ideas, or system contributions that make the work stand out.

code translation
large language model (LLM)
method-level and class-level translation
executable correctness
static semantic errors
🔎 Similar Papers
2024-03-252024 IEEE/ACM First International Conference on AI Foundation Models and Software Engineering (Forge) Conference Acronym:Citations: 22
💼 Related Jobs
No related jobs found.
R
Ruihang Fan
School of Computer Software, College of Intelligence and Computing, Tianjin University, Tianjin 300350, China
Jiajun Jiang
Jiajun Jiang
Associate Professor, Tianjin University
Program AnalysisAutomated DebuggingProgram Transformation
X
Xinpeng Wang
School of Computer Software, College of Intelligence and Computing, Tianjin University, Tianjin 300350, China
J
Jiateng Fu
School of Computer Software, College of Intelligence and Computing, Tianjin University, Tianjin 300350, China
Fengjie Li
Fengjie Li
Tianjin University
Software EngineeringProgram Repair
Jiasi Shen
Jiasi Shen
The Hong Kong University of Science and Technology (HKUST)
programming languagessoftware engineering