Automated Program Repair for Introductory Programming Assignments Via Bidirectional Refactoring

Linna Xie,Chongmin Li,Yu Pei,Tian Zhang,Minxue Pan
DOI: https://doi.org/10.1145/3643788.3648017
2024-01-01
Abstract:The development of programming education has given rise to automated program repair techniques tailored for introductory programming assignments (IPAs). Despite the promising performance of mainstream automated feedback generation systems, they still struggle to handle scenarios where there is “no matching control-flow to generate repair” well. This paper presents Brafar, an innovative automated program repair tool for IPAs. Brafar tackles the core issue through a novel “bidirectional refactoring” algorithm which aligns the control-flow structures of the incorrect and ref-erence programs without semantic changes. Additionally, Brafar incorporates a specification inference technique to further enhance the repair process, reducing the occurrence of unnecessary repairs. We have implemented the Brafar tool in Python and it is now publicly available. In comparative experiments, both the Brafar tool and the baseline Refactory tool were evaluated using 100 real-life incorrect programs from 5 different IPAs. The outcomes of these experiments demonstrated that our Brafar tool outperformed the baseline tool in terms of repair accuracy.
What problem does this paper attempt to address?