mlsanityData to 7 Oct 2026

LegacyTranslate: LLM-based Multi-Agent Method for Legacy Code Translation

arXiv 2603.14054 ↗First posted 14 Mar 2026cs.SEcited by 0

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Modernizing large legacy systems remains a major challenge in enterprise environments, particularly when migration must preserve domain-specific logic while conforming to internal architectural frameworks and shared APIs. Direct application of Large Language Models (LLMs) for code translation often produces syntactically valid outputs that fail to compile or integrate within existing production frameworks, limiting their practical adoption in real-world modernization efforts. In this paper, we propose LegacyTranslate, a multi-agent framework for API-aware code translation, developed and evaluated in the context of an ongoing modernization effort at a financial institution migrating approximately 2.5 million lines of PL/SQL to Java. The core idea is to use specialized LLM-based agents, each addressing a different aspect of the translation challenge. Specifically, LegacyTranslate consists of three agents: Initial Translation Agent produces an initial Java translation using retrieved in-context examples; API Grounding Agent aligns the code with existing APIs by retrieving relevant entries from an API knowledge base; and Refinement Agent iteratively refines the output using compiler feedback and API suggestions to improve correctness. Our experiments show that each agent contributes to better translation quality. The Initial Translation Agent alone achieves 45.6% compilable outputs and 30.9% test-pass rate. With API Grounding Agent and Refinement Agent, compilation improves by an additional 8% and test-pass accuracy increases by 3%.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 7 of its 17 references that are in the map. First posted on arXiv 14 Mar 2026.

Builds on

7 of 17 references.

References · 7

  1. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  2. 2025Multi-Agent Collaboration Mechanisms: A Survey of LLMscited by 424
  3. 2020Unsupervised Translation of Programming Languagescited by 262
  4. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?cited by 89
  5. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  6. 2025Enhancing Project-Specific Code Completion by Inferring Internal API Informationcited by 5
  7. 2025Automated Testing of COBOL to Java Transformationcited by 4

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025RepoTransAgent: Multi-Agent LLM Framework for Repository-Aware Code Translation
  2. 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignment
  3. 2025BabelCoder: Agentic Code Translation with Specification Alignment
  4. 2025LLM-based Multi-Agent System for Intelligent Refactoring of Haskell Code
  5. 2025A Pilot Study on LLM-Based Agentic Translation from Android to iOS: Pitfalls and Insights
  6. 2026Can Large Language Models Implement Agent-Based Models? An ODD-based Replication Study
  7. 2025A Survey on Code Generation with LLM-based Agents
  8. 2026ReCodeAgent: A Multi-agent Workflow for Language-Agnostic Translation and Validation of Large-Scale Repositories