RustRepoTrans: Repository-level Context Code Translation Benchmark Targeting Rust
Guangsheng Ou, Mingwei Liu, Yuxuan Chen, Yanlin Wang, Xin Peng, Zibin Zheng
摘要
Recent advancements in large language models (LLMs) have demonstrated impressive capabilities in code translation, typically evaluated using benchmarks like CodeTransOcean and RepoTransBench. However, dependency-free benchmarks fail to capture real-world complexities by focusing primarily on simple function-level translations and overlooking repository-level context (e.g., dependencies). Full-repository translation benchmarks significantly exceed the current capabilities of existing models, resulting in performance bottlenecks that fail to provide actionable insights for guiding model development. Furthermore, existing benchmarks do not account for the scenario of incrementally translating new or modified modules from the source to the target language, which demands careful handling of repository-level contexts such as dependencies, cross-module references, and architectural divergence. Moreover, LLMs’ effectiveness in translating to newer, low-resource languages like Rust remains largely underexplored.To address these gaps, we introduce RustRepoTrans, the first repository-level context code translation benchmark targeting incremental translation, comprising 375 tasks translating into Rust from C, Java, and Python. Using this benchmark, we evaluate seven representative LLMs, analyzing their errors to assess limitations in complex translation scenarios. Among them, DeepSeek-R1 performs best with 51.5% Pass@1, excelling in both basic functionality and additional translation abilities, such as noise robustness and syntactical difference identification. However, even DeepSeek-R1 experiences a 22.2% performance drop (Pass@1 from 73.7% to 51.5%) when handling repository-level context compared to previous benchmarks without such context. Meanwhile, we propose a set of more fine-grained evaluation metrics and an enhanced evaluation framework, enabling a more comprehensive analysis of LLMs’ performance in repository-level context code translation tasks to provide fine-grained insights that can effectively inform the development of code translation techniques.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper5
- MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and RepairAli Reza Ibrahimzada, Brandon Paulsen, Reyhaneh Jabbarvand, Joey Dodds 等ICML 2026 · 被引用 9 次
- TransLibEval: Demystify Large Language Models' Capability in Third-Party Library-Targeted Code TranslationPengyu Xue, Kunwu Zheng, Zhen Yang, Yifei Pei 等FSE 2026 · 被引用 1 次
- Evaluating and Improving Automated Repository-Level Rust Issue Resolution with LLM-based AgentsJiahong Xiang, Wenxiao He, Xihua Wang, Hongliang Tian 等ICSE 2026
- Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent RefinementWenqiang Luo, Jacky Wai Keung, Boyang Yang, Jacques Klein 等ICSE 2026
- RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language ModelsYanlin Wang, Suiquan Wang, Yanli Wang, Bowen Zhang 等FSE 2026
它引用的顶会 Paper9
- Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 被引用 606 次
- Using an LLM to Help With Code UnderstandingDaye Nam, Andrew Macvean, Vincent J. Hellendoorn, Bogdan Vasilescu 等ICSE 2024 · 被引用 264 次
- Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating CodeRangeet Pan, Ali Reza Ibrahimzada, Rahul Krishna, Divya Sankar 等ICSE 2024 · 被引用 96 次
- Exploring and Unleashing the Power of Large Language Models in Automated Code TranslationZhen Yang, Fang Liu, Zhongxing Yu, Jacky Wai Keung 等FSE 2024 · 被引用 72 次
- Demystifying LLM-Based Software Engineering AgentsChunqiu Steven Xia, Yinlin Deng, Soren Dunn, Lingming ZhangFSE 2025 · 被引用 36 次
相关 Paper
- Can Language Models Replace Programmers for Coding? REPOCOD Says 'Not Yet'Shanchao Liang, Nan Jiang, Yiran Hu, Lin TanACL 2025 · 被引用 9 次
- Scalable, Validated Code Translation of Entire Projects using Large Language ModelsHanliang Zhang, Cristina David, Meng Wang, Brandon Paulsen 等PLDI 2025 · 被引用 15 次
- Polyglot: An Extensible Framework to Benchmark Code Translation with LLMsMarco Vieira, Priyam Ashish Shah, Bhavain Shah, Rrezarta KrasniqiASE 2025
- Code–Test Co-translation: Towards Practical and Effective Program Migration in the WildXitao Li, Xiaofei Xie, Jiang Wu, Ting Liu 等OOPSLA 2026 · 被引用 1 次
- RepoBench: Benchmarking Repository-Level Code Auto-Completion SystemsTianyang Liu, Canwen Xu, Julian J. McAuleyICLR 2024 · 被引用 338 次
