Repairing Bugs in Python Assignments Using Large Language Models

By Jialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le, R. Piskac, Gustavo Soares, Gust Verbruggen. 2022

67 citations recorded by the source corpus.

Students often make mistakes on their introductory programming assignments as part of their learning process. Unfortunately, providing custom repairs for these mistakes can require a substantial amount of time and effort from class instructors. Automated program repair (APR) techniques can be used to synthesize such fixes. Prior work has explored the use of symbolic and neural techniques for APR in the education domain. Both types of approaches require either substantial engineering efforts or large amounts of data and training. We propose to use a large language model trained on code, such as Codex, to build an APR system -- MMAPR -- for introductory Python programming assignments. Our system can fix both syntactic and semantic mistakes by combining multi-modal prompts, iterative querying, test-case-based selection of few-shots, and program chunking. We evaluate MMAPR on 286 real student programs and compare to a baseline built by combining a state-of-the-art Python syntax repair engine, BIFI, and state-of-the-art Python semantic repair engine for student assignments, Refactory. We find that MMAPR can fix more programs and produce smaller patches on average.

Subfields: Artificial Intelligence, Information Systems, Software, Natural Language Processing

How researchers see this paper

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

In Artificial Intelligence

  1. Gabriel Synnaeve
  2. Yossi Adi
  3. Jade Copet
  4. Nicolas Usunier
  5. Tal Remez
  6. Hugo Touvron
  7. Jianfeng Gao
  8. Itai Gat

In Information Systems

  1. Gabriel Synnaeve
  2. Nicolas Usunier
  3. Wenhan Xiong
  4. Baptiste Rozière
  5. Thomas Scialom
  6. Jason Aaron Edward Weston
  7. Aliaksei Severyn

In Software

  1. Gabriel Synnaeve
  2. Baptiste Rozière

In Natural Language Processing

  1. Gabriel Synnaeve
  2. Yossi Adi
  3. Nicolas Usunier
  4. Thomas Scialom
  5. Louis Martin
  6. Jade Copet
  7. Hugo Touvron
  8. Tal Remez

Citations in the corpus