InferFix: End-to-End Program Repair with LLMs

By Ma Jin, Syed Shahriar, Michele Tufano, Xin Shi, Shuai Lu, Neel Sundaresan, Alexey Svyatkovskiy. ESEC/SIGSOFT FSE, 2023

324 citations recorded by the source corpus.

Software development life cycle is profoundly influenced by bugs; their introduction, identification, and eventual resolution account for a significant portion of software development cost. This has motivated software engineering researchers and practitioners to propose different approaches for automating the identification and repair of software defects. Large Language Models (LLMs) have been adapted to the program repair task through few-shot demonstration learning and instruction prompting, treating this as an infilling task. However, these models have only focused on learning general bug-fixing patterns for uncategorized bugs mined from public repositories. In this paper, we propose : a transformer-based program repair framework paired with a state-of-the-art static analyzer to fix critical security and performance bugs. combines a Retriever – transformer encoder model pretrained via contrastive learning objective, which aims at searching for semantically equivalent bugs and corresponding fixes; and a Generator – an LLM (12 billion parameter Codex Cushman model) finetuned on supervised bug-fix data with prompts augmented via adding bug type annotations and semantically similar fixes retrieved from an external non-parametric memory. To train and evaluate our approach, we curated , a novel, metadata-rich dataset of bugs extracted by executing the Infer static analyzer on the change histories of thousands of Java and C# repositories. Our evaluation demonstrates that outperforms strong LLM baselines, with a top-1 accuracy of 65.6% for generating fixes in C# and 76.8% in Java. We discuss the deployment of alongside Infer at Microsoft which offers an end-to-end solution for detection, classification, and localization of bugs, as well as fixing and validation of candidate patches, integrated in the continuous integration (CI) pipeline to automate the software development workflow.

Subfields: Information Systems, Software

View Paper: https://www.semanticscholar.org/paper/34d24b2d9f116f8f652c112d4ac924afcf11bd0d

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Information Systems

  1. Fuli Feng
  2. Shin Yoo
  3. Mark Harman
  4. Xiangnan He
  5. Wenjie Wang
  6. Yang Zhang
  7. Jizhi Zhang
  8. Keqin Bao

In Software

  1. Shin Yoo
  2. Mark Harman
  3. Shubho Sengupta
  4. Mitya Lyubarskiy
  5. Jie M. Zhang
  6. Angela Fan
  7. Beliz Gokkaya
  8. Phil McMinn

Citations in the corpus