A Systematic Study of LLM-Based Code Translation from Multiple Perspectives
Abstract
Large Language Models (LLMs) have demonstrated powerful capabilities in code analysis, exhibiting a deep understanding of code semantics and functionality. Programming code lies at the heart of software development, and the automation and intelligent generation of code can effectively shorten development cycles and reduce labor costs. Current research on code transformation using Large Language Models is gradually emerging. However, these works vary in research perspective, object, and goal, making it difficult to comprehensively evaluate the advantages and characteristics of Large Language Models in code translation tasks. Moreover, existing code translation primarily focuses on simple code translation for explicit tasks and remains incomplete for code translation of complex software systems.Therefore, this paper analyzes the inherent characteristics of Large Language Models in code translation based on their working mechanisms and characteristics. It comprehensively investigates research on code-intelligent generation using Large Language Models over the past two years, particularly examining effectiveness for complex generation tasks and relevant technologies from both task-oriented and technical perspectives. During this process, the impact of prompt engineering methods in code translation is specifically examined. Through systematic analysis and research, it has been found that Large Language Model systems like ChatGPT [1] are effective for code translation tasks with clear objectives. However, they still exhibit room for improvement in handling complex tasks, such as the inability to accurately translate code with tightly coupled contextual logic and the failure to generate code for complex software-system translation.
References
- ChatGPT [OL], https: //chat.openai.com/chat
- Karanjai R, Blackshear S, Xu L, et al. Collaboration is all you need: LLM Assisted Safe Code Translation [C]//Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering. 2025: 671-675.
- Macedo M, Tian Y, Adams B. CodeTransEngine: Ready-to-use Backend for LLM-based Code Translation [C]//ICLR 2025 Third Workshop on Deep Learning for Code.
- Pan J, Sadé A, Kim J, et al. SteloCoder: a decoder-only LLM for multi-language to Python code translation [J]. arxiv preprint arxiv: 2310.15539, 2023.
- Google. Response on the concept of artificial intelligence [Online]. https: //bard.google.com/, 29 Aug. 2025.
- Baidu. Response on the concept of blockchain [Online]. https: //yiyan.baidu.com/
- Yan W, Tian Y, Li Y, et al. Codetransocean: A comprehensive multilingual benchmark for code translation [J]. arxiv preprint arxiv: 2310.04951, 2023
- E. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, and J. Ma, "LORA: LOW-RANK ADAPTION OF LARGE LANGUAGE MODELS, " arXiv preprint arXiv: 2106.09685, 2021
- M. I. Jordan and G. E. Hinton, "Adaptive mixtures of local experts, " Neural Computation, vol. 3, no. 1, pp. 79-87, 1991.
- Yuan Z, Chen W, Wang H, et al. Transagent: An llm-based multi-agent system for code translation [J]. arxiv preprint arxiv: 2409.19894, 2024.
- Code translation with corrector via llms [J]. arxiv preprint arxiv: 2407.07472, 2024.
- Ou G, Liu M, Chen Y, et al. Enhancing llm-based code translation in repository context via triple knowledge-augmented [J]. arxiv preprint arxiv: 2503.18305, 2025.
- Yang Z, Liu F, Yu Z, et al. Exploring and unleashing the power of large language models in automated code translation [J]. Proceedings of the ACM on Software Engineering, 2024, 1(FSE): 1585-1608.
- Tao Q, Yu T, Gu X, et al. Unraveling the Potential of Large Language Models in Code Translation: How Far are We? [C]//2024 31st Asia-Pacific Software Engineering Conference (APSEC). IEEE, 2024: 353-362.
- Jana P, Jha P, Ju H, et al. Cotran: An llm-based code translator using reinforcement learning with feedback from compiler and symbolic execution [J]. arxiv preprint arxiv: 2306.06755, 2023.
- Luo Y, Yu R, Zhang F, et al. Bridging gaps in llm code translation: Reducing errors with call graphs and bridged debuggers [C]//Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering. 2024: 2448-2449.
- Mu F, Shi L, Wang S, et al. Clarifygpt: Empowering llm-based code generation with intention clarification [J]. arxiv preprint arxiv: 2310.10996, 2023.
- Eniser H F, Zhang H, David C, et al. Towards translating real-world code with llms: A study of translating to rust [J]. arxiv preprint arxiv: 2405.11514, 2024
- Wang Y, Le H, Gotmare A D, et al. Codet5+: Open code large language models for code understanding and generation [J]. arxiv preprint arxiv: 2305.07922, 2023.
- Kumar J, Janapati V L S, Tanguturi M R, et al. I Can't Share Code, but I need Translation--An Empirical Study on Code Translation through Federated LLM [J]. arxiv preprint arxiv: 2501.05724, 2025.
- Hu E J, Shen Y, Wallis P, et al. Lora: Low-rank adaptation of large language models [J]. ICLR, 2022, 1(2): 3.