一句话:提出BRAFAR,通过双向语义保持重构与由粗到细故障定位,为入门编程作业生成更准确、补丁更小的修复。
针对入门编程作业自动反馈生成,已有Refactory采用逐块修复,但随机应用重构与变异来对齐控制流结构成功率低且复杂化修复,并忽略基本块角色导致不必要修复。BRAFAR的核心是双向重构算法与由粗到细故障定位:前者以受引导方式对正确与错误程序都施加保持语义的重构操作,从而对齐控制流结构;后者根据所在语句及基本块自身语义,识别真正需要修复的基本块。在公开数据集1783份真实错误学生提交上,BRAFAR显著优于Refactory和Clara,能在更短时间内为更多错误程序生成正确且补丁更小的修复。
The problem of automated feedback generation for introductory programming assignments (IPAs) has attracted significant attention with the increasing demand for programming education. While existing approaches, like Refactory, that employ the ”block-by-block” repair strategy have produced promising results, they suffer from two limitations. First, Refactory randomly applies refactoring and mutation operations to correct and buggy programs, respectively, to align their control-flow structures (CFSs), which, however, has a relatively low success rate and often complicates the original repairing tasks. Second, Refactory generates repairs for each basic block of the buggy program when its semantics differs from the counterpart in the correct program, which, however, ignores the different roles that basic blocks play in the programs and often produces unnecessary repairs. To overcome these limitations, we propose the Brafar approach to feedback generation for IPAs. The core innovation of Brafar lies in its novel bidirectional refactoring algorithm and coarse-to-fine fault localization. The former aligns the CFSs of buggy and correct programs by applying semantics-preserving refactoring operations to both programs in a guided manner, while the latter identifies basic blocks that truly need repairs based on the semantics of their enclosing statements and themselves. In our experimental evaluation on 1783 real-life incorrect student submissions from a publicly available dataset, Brafar significantly outperformed Refactory and Clara, generating correct repairs for more incorrect programs with smaller patch sizes in a shorter time.
DOI 原文 ·
@inproceedings{paperbot8503,
title = {BRAFAR: Bidirectional Refactoring, Alignment, Fault Localization, and Repair for Programming Assignments},
author = {Linna Xie and Chongmin Li and Yu Pei and Tian Zhang and Minxue Pan},
booktitle = {ISSTA},
year = {2024},
doi = {10.1145/3650212.3680326}
}