RepoTransAgent: Multi-Agent LLM Framework for Repository-Aware Code Translation
Ziqi Guan, Xin Yin, Zhiyuan Peng, Chao Ni

TL;DR
RepoTransAgent is a multi-agent framework that improves repository-aware code translation by decomposing tasks, using retrieval-augmented generation, adaptive prompts, and error correction, significantly outperforming existing methods on Java-C# translation.
Contribution
It introduces a novel multi-agent framework that systematically decomposes code translation into specialized subtasks with retrieval, adaptive prompts, and error correction, enhancing accuracy and robustness.
Findings
Achieves up to 55.34% compile rate and 45.84% pass rate on Java-C# translation.
Outperforms state-of-the-art baselines in real-world repository scenarios.
Demonstrates robustness and generalizability across different LLMs.
Abstract
Repository-aware code translation is critical for modernizing legacy systems, enhancing maintainability, and enabling interoperability across diverse programming languages. While recent advances in large language models (LLMs) have improved code translation quality, existing approaches face significant challenges in practical scenarios: insufficient contextual understanding, inflexible prompt designs, and inadequate error correction mechanisms. These limitations severely hinder accurate and efficient translation of complex, real-world code repositories. To address these challenges, we propose RepoTransAgent, a novel multi-agent LLM framework for repository-aware code translation. RepoTransAgent systematically decomposes the translation process into specialized subtasks-context retrieval, dynamic prompt construction, and iterative code refinement-each handled by dedicated agents. Our…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
