Repair Is Nearly Generation: Multilingual Program Repair with LLMs
Harshit Joshi, José Pablo Cambronero Sánchez, Sumit Gulwani, Vu Le, Gust Verbruggen, Ivan Radicek
摘要
Most programmers make mistakes when writing code. Some of these mistakes are small and require few edits to the original program – a class of errors recently termed last mile mistakes. These errors break the flow for experienced developers and can stump novice programmers. Existing automated repair techniques targeting this class of errors are language-specific and do not easily carry over to new languages. Transferring symbolic approaches requires substantial engineering and neural approaches require data and retraining. We introduce RING, a multilingual repair engine powered by a large language model trained on code (LLMC) such as Codex. Such a multilingual engine enables a flipped model for programming assistance, one where the programmer writes code and the AI assistance suggests fixes, compared to traditional code suggestion technology. Taking inspiration from the way programmers manually fix bugs, we show that a prompt-based strategy that conceptualizes repair as localization, transformation, and candidate ranking, can successfully repair programs in multiple languages with minimal effort. We present the first results for such a multilingual repair engine by evaluating on 6 different languages and comparing performance to language-specific repair engines. We show that RING can outperform language-specific repair engines for three of these languages.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 45 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer 引用了 Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
- Large Language Models Meet NL2Code: A Survey 引用了 Language Models are Few-Shot Learners
- Graph-based, Self-Supervised Program Repair from Diagnostic Feedback 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Synchromesh: Reliable Code Generation from Pre-trained Language Models 引用了 Language Models are Few-Shot Learners
- Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models 引用了 Language Models are Few-Shot Learners
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 Language Models are Few-Shot Learners
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair 引用了 Synchromesh: Reliable Code Generation from Pre-trained Language Models
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair 引用了 Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
引用它的顶会 Paper45
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program RepairYuxiang Wei, Chunqiu Steven Xia, Lingming ZhangFSE 2023 · 111 次引用
- Large Language Models Meet NL2Code: A SurveyDaoguang Zan, Bei Chen, Fengji Zhang, Dianjie Lu 等ACL 2023 · 104 次引用
- 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 次引用
- Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language ModelsToufique Ahmed, Supriyo Ghosh, Chetan Bansal, Thomas Zimmermann 等ICSE 2023 · 93 次引用
- An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program RepairKai Huang, Xiangxin Meng, Jian Zhang, Yang Liu 等ASE 2023 · 91 次引用
它引用的 Paper9
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- Synchromesh: Reliable Code Generation from Pre-trained Language ModelsGabriel Poesia, Alex Polozov, Vu Le, Ashish Tiwari 等ICLR 2022 · 200 次引用
- Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 次引用
- TFix: Learning to Fix Coding Errors with a Text-to-Text TransformerBerkay Berabi, Jingxuan He, Veselin Raychev, Martin T. VechevICML 2021 · 143 次引用
相关 Paper
- PyDex: Repairing Bugs in Introductory Python Assignments using LLMsJialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le 等OOPSLA 2024 · 38 次引用
- Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury 等ICSE 2023 · 213 次引用
- CIRCLE: continual repair across programming languagesWei Yuan, Quanjun Zhang, Tieke He, Chunrong Fang 等ISSTA 2022 · 57 次引用
- MdEval: Massively Multilingual Code DebuggingShukai Liu, Linzheng Chai, Jian Yang, Jiajun Shi 等ACL Findings 2026 · 1 次引用
- INTERVENOR: Prompting the Coding Ability of Large Language Models with the Interactive Chain of RepairHanbin Wang, Zhenghao Liu, Shuo Wang, Ganqu Cui 等ACL Findings 2024 · 14 次引用
