Code Debugging with LLM-Generated Explanations of Programming Error Messages
Programming is an essential part of the curriculum for electrical, computer and software engineering students. Since one inevitably makes coding mistakes, it is important for programmers to develop debugging skills. However, it could be challenging for beginners to repair a non-compiling program, since programming error messages tend to be opaque, and might not directly address the error. This paper investigates the use of Large Language Models to generate plain, novice-friendly explanations of programming error messages. In an introductory course on Natural Language Processing, We evaluate the extent to which these explanations help students debug Python code with six common programming error categories. Experimental results suggest that explanations generated with zero-shot GPT-4 are effective in raising the code revision success rate.
Authors
- Tianyuan Cai (ORCID: https://orcid.org/0000-0001-5315-233X)
- John Lee (ORCID: https://orcid.org/0000-0003-2505-2678)
- Fengkai Liu (ORCID: https://orcid.org/0000-0002-0422-3362)
Institutions
- City University of Hong Kong (HK)
Publication Details
- Published
- 2024-11-19
- DOI
- https://doi.org/10.1109/iceed62316.2024.10923833
- Citations
- 2
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 1.56