A Multi-Perspective Investigation into Code Migration for Large Language Models
Abstract
With the rise of large language models (LLMs), their powerful capabilities in code understanding and generation have paved a new technical path for automated code migration, making LLM-based code migration a growing research hotspot. Despite the surging number of relevant studies, there is still a lack of systematic collation, resulting in an unclear overall picture of its technical paths and task adaptability. To address this issue, this paper conducts a comprehensive survey of typical works related to LLM-based code migration in recent years and a systematic multi-perspective investigation of the important ones, focusing on two core dimensions: Methods and Tasks. Centering on different methodological paths such as LLM feedback and traditional analysis, as well as task scenarios including data resources, quality analysis, and tool development and improvement, the paper systematically summarizes their highlights and limitations. The study finds that methodologically, the generation and understanding capabilities of LLMs have improved the efficiency and accuracy of code migration; in terms of tasks, existing works have realized the leap from simple snippet translation to complex industrial-grade scenarios. However, current research still has obvious common limitations in handling non-functional attributes such as in-depth semantic understanding, cross-file global dependencies, and performance and security assurance. Based on the survey results, this paper points out that the lack of technical reliability and evaluation testing dimensions is the key bottleneck at present, and proposes future development directions including constructing a knowledge-enhanced migration framework, establishing a standardized evaluation system, and processing full project associations.
References
- Eniser H F, Wüstholz V, Christakis M. Automatically testing functional properties of code translation models [C]//Proceedings of the AAAI Conference on Artificial Intelligence. 2024, 38(19): 21055-21062.
- Feischl C, Kern R. Large Language Models for Code Translation: An In-Depth Analysis of Code Smells and Functional Correctness [J]. ACM Transactions on Software Engineering and Methodology, 2025.
- Zhu M, Suresh K, Reddy C K. Multilingual code snippets training for program translation [C]//Proceedings of the AAAI conference on artificial intelligence. 2022, 36(10): 11783-11790.
- Szafraniec M, Roziere B, Leather H, et al. Code translation with compiler representations [J]. arXiv preprint arXiv: 2207.03578, 2022.
- Dilhara M, Bellur A, Bryksin T, et al. Unprecedented code change automation: The fusion of llms and transformation by example [J]. Proceedings of the ACM on Software Engineering, 2024, 1(FSE): 631-653.
- Guizzo G, Zhang J M, Sarro F, et al. Mutation analysis for evaluating code translation [J]. Empirical Software Engineering, 2024, 29(1): 19.
- 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.
- Islam M, Jha A K, Akhmetov I, et al. Characterizing Python Library Migrations [J]. Proceedings of the ACM on Software Engineering, 2024, 1(FSE): 92-114.
- Jiao M, Yu T, Li X, et al. On the evaluation of neural code translation: Taxonomy and benchmark [C]//2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 2023: 1529-1541.
- Chen QY, Li SP, Yan M, et al. Code clone detection: A literature review [J]. Ruan Jian Xue Bao/Journal of Software, 2019, 30(4): 962980 (in Chinese). http: //www.jos.org.cn/1000-9825/5711.htm
- Hou X, Zhao Y, Liu Y, et al. Large language models for software engineering: A systematic literature review [J]. ACM Transactions on Software Engineering and Methodology, 2024, 33(8): 1-79.
- Fan A, Gokkaya B, Harman M, et al. Large language models for software engineering: Survey and open problems [C]//2023 IEEE/ACM International Conference on Software Engineering: Future of Software Engineering (ICSE-FoSE). IEEE, 2023: 31-53.
- Lu S, Guo D, Ren S, et al. Codexglue: A machine learning benchmark dataset for code understanding and generation [J]. arXiv preprint arXiv: 2102.04664, 2021.
- Roziere B, Lachaux M A, Chanussot L, et al. Unsupervised translation of programming languages [J]. Advances in neural information processing systems, 2020, 33: 20601-20611.
- Yan W, Tian Y, Li Y, et al. Codetransocean: A comprehensive multilingual benchmark for code translation [J]. arXiv preprint arXiv: 2310.04951, 2023.
- Pan R, Ibrahimzada A R, Krishna R, et al. Lost in translation: A study of bugs introduced by large language models while translating code [C]//Proceedings of the IEEE/ACM 46th International Conference on Software Engineering. 2024: 1-13.
- Li Z, Xu MR, Wu YH, et al. Source code migration model based on hierarchical attention mechanism [J]. Application Research of Computers, 2023, 40(10). (in Chinese).
- Omidvar Tehrani B, M I, Anubhai A. Evaluating human-ai partnership for llm-based code migration [C]//Extended abstracts of the CHI conference on human factors in computing systems. 2024: 1-8.
- Nikolov S, Codecasa D, Sjövall A, et al. How is google using ai for internal code migrations? [C]//2025 IEEE/ACM 47th International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP). IEEE, 2025: 481-492.
- Cheng K, Shen X, Yang Y, et al. Codemenv: Benchmarking large language models on code migration [C]//Findings of the Association for Computational Linguistics: ACL 2025. 2025: 2719-2744.