Repairing Bugs in Python Assignments Using Large Language Models
Jialu Zhang, Jos\'e Cambronero, Sumit Gulwani, Vu Le, Ruzica Piskac,, Gustavo Soares, Gust Verbruggen

TL;DR
This paper introduces MMAPR, a novel approach using a large language model trained on code to automatically repair both syntactic and semantic errors in Python student assignments, outperforming existing methods.
Contribution
The paper presents MMAPR, the first large language model-based system for repairing student Python code, combining multi-modal prompts, iterative querying, and test-case selection.
Findings
MMAPR fixes more student programs than baseline methods.
MMAPR produces smaller patches on average.
MMAPR effectively repairs both syntax and semantic errors.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Topic Modeling
MethodsRepair
