Lune

AAAI2023Top-tier venue

Repair Is Nearly Generation: Multilingual Program Repair with LLMs

Harshit Joshi, José Pablo Cambronero Sánchez, Sumit Gulwani, Vu Le, Gust Verbruggen, Ivan Radicek

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

45 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • TFix: Learning to Fix Coding Errors with a Text-to-Text Transformer cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
  • Large Language Models Meet NL2Code: A Survey cites Language Models are Few-Shot Learners
  • Graph-based, Self-Supervised Program Repair from Diagnostic Feedback cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Synchromesh: Reliable Code Generation from Pre-trained Language Models cites Language Models are Few-Shot Learners
  • Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models cites Language Models are Few-Shot Learners
  • Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites Language Models are Few-Shot Learners
  • Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair cites Synchromesh: Reliable Code Generation from Pre-trained Language Models
  • An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program Repair cites 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 cites 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 cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers45

  1. Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program RepairYuxiang Wei, Chunqiu Steven Xia, Lingming ZhangFSE 2023 · 111 citations
  2. Large Language Models Meet NL2Code: A SurveyDaoguang Zan, Bei Chen, Fengji Zhang, Dianjie Lu et al.ACL 2023 · 104 citations
  3. Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating CodeRangeet Pan, Ali Reza Ibrahimzada, Rahul Krishna, Divya Sankar et al.ICSE 2024 · 96 citations
  4. Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language ModelsToufique Ahmed, Supriyo Ghosh, Chetan Bansal, Thomas Zimmermann et al.ICSE 2023 · 93 citations
  5. An Empirical Study on Fine-Tuning Large Language Models of Code for Automated Program RepairKai Huang, Xiangxin Meng, Jian Zhang, Yang Liu et al.ASE 2023 · 91 citations

Builds on9

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  3. Synchromesh: Reliable Code Generation from Pre-trained Language ModelsGabriel Poesia, Alex Polozov, Vu Le, Ashish Tiwari et al.ICLR 2022 · 200 citations
  4. Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 citations
  5. TFix: Learning to Fix Coding Errors with a Text-to-Text TransformerBerkay Berabi, Jingxuan He, Veselin Raychev, Martin T. VechevICML 2021 · 143 citations

Related papers

  1. PyDex: Repairing Bugs in Introductory Python Assignments using LLMsJialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le et al.OOPSLA 2024 · 38 citations
  2. Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury et al.ICSE 2023 · 213 citations
  3. CIRCLE: continual repair across programming languagesWei Yuan, Quanjun Zhang, Tieke He, Chunrong Fang et al.ISSTA 2022 · 57 citations
  4. MdEval: Massively Multilingual Code DebuggingShukai Liu, Linzheng Chai, Jian Yang, Jiajun Shi et al.ACL Findings 2026 · 1 citation
  5. INTERVENOR: Prompting the Coding Ability of Large Language Models with the Interactive Chain of RepairHanbin Wang, Zhenghao Liu, Shuo Wang, Ganqu Cui et al.ACL Findings 2024 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines