Automated code translation is vital for software modernisation.While large language models (LLMs) show promise, existing methods often use uniform strategies for all code complexities and lack specialised error handling.We present AdaptTrans, a method featuring complexity-aware strategy selection and iterative error refinement.It first assesses code translation task complexity: simple tasks receive direct translation, while complex tasks employ specific enhancement strategies.An error-driven iterative refinement system then identifies error types and applies targeted optimisations.Evaluated on CodeNet and TransCoder benchmarks across multiple programming languages, AdaptTrans demonstrates significant improvements in translation accuracy over state-of-the-art baselines.The complexity-aware mechanism reduced average iteration count for simple translations by 8.5% while improving pass rate by 4.1%, confirming enhanced efficiency and effectiveness.
Building similarity graph...
Analyzing shared references across papers
Loading...
Minshan Lin
Zhen Lin
Xin Liu
International Journal of Information and Communication Technology
Building similarity graph...
Analyzing shared references across papers
Loading...
Lin et al. (Thu,) studied this question.
www.synapsesocial.com/papers/69bf86ecf665edcd009e90e5 — DOI: https://doi.org/10.1504/ijict.2026.152440