一句话:提出 LANTERN,通过跨语言翻译与多智能体迭代修复,将缺陷迁移至 LLM 更擅长的语言,显著提升多语言程序修复效果。
现有基于 LLM 的自动程序修复主要集中于 Java/Python 等主流语言,Rust 等新兴语言因训练资源、数据和社区支持不足,修复能力差距大。方法上,本文提出 LANTERN,无需额外训练,通过跨语言翻译把缺陷代码从 LLM 修复能力弱的语言迁移到能力强的语言;采用多智能体迭代修复范式,并用基于 LLM 的决策系统根据缺陷特征动态选择目标语言,持续纳入前次修复反馈。评估在 xCodeEval 多语言基准上进行,涵盖 11 种语言、5,068 个缺陷。结果显示修复效果显著提升,代表性不足语言受益明显,Rust 的 Pass@10 提升 22.09%,首次实证跨语言翻译能扩展 LLM 修复能力并缩小语言间差距。
Recent advances in leveraging LLMs for APR have demonstrated impressive capabilities in fixing software defects. However, current LLM-based approaches predominantly focus on mainstream programming languages like Java and Python, neglecting less prevalent but emerging languages such as Rust due to expensive training resources, limited datasets, and insufficient community support. This narrow focus creates a significant gap in repair capabilities across the programming language spectrum, where the full potential of LLMs for comprehensive multilingual program repair remains largely unexplored. To address this limitation, we introduce a novel cross-language program repair approach LANTERN that leverages LLMs’ differential proficiency across languages through a multi-agent iterative repair paradigm. Our technique strategically translates defective code from languages where LLMs exhibit weaker repair capabilities to languages where they demonstrate stronger performance, without requiring additional training. A key innovation of our approach is an LLM-based decision-making system that dynamically selects optimal target languages based on bug characteristics and continuously incorporates feedback from previous repair attempts. We evaluate our method on xCodeEval, a comprehensive multilingual benchmark comprising 5,068 bugs across 11 programming languages. Results demonstrate significant enhancement in repair effectiveness, particularly for underrepresented languages, with Rust showing a 22.09% improvement in Pass@10 metrics. Our research provides the first empirical evidence that cross-language translation significantly expands the repair capabilities of LLMs and effectively bridges the performance gap between programming languages with different levels of popularity, opening new avenues for truly language-agnostic automated program repair.
@inproceedings{paperbot11816,
title = {Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent Refinement},
author = {Wenqiang Luo and Jacky Wai Keung and Boyang Yang and Jacques Klein and Tegawende F. Bissyande and Haoye Tian and Bach Le},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3744916.3773227}
}