paperbot · PL 论文追踪

全部论文 待读 收藏

P2 BRAFAR: Bidirectional Refactoring, Alignment, Fault Localization, and Repair for Programming Assignments

BRAFAR:面向编程作业的双向重构、对齐、故障定位与修复
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 2/10 · 论文研究入门编程作业的自动修复与故障定位,属于程序修复/重构方向,但与用户关注的 LLM/Agent 与静态分析交叉、Agentic 程序分析、浮点程序分析及贝叶斯程序分析均无直接关系;应用场景也限于编程教育反馈,不涉及机器学习系统或工业级静态分析工具。引用 2 inbox
Linna Xie, Chongmin Li, Yu Pei, Tian Zhang, Minxue Pan
crossref: 2026-09-12

AI 速览

一句话:提出BRAFAR,通过双向语义保持重构与由粗到细故障定位,为入门编程作业生成更准确、补丁更小的修复。

针对入门编程作业自动反馈生成,已有Refactory采用逐块修复,但随机应用重构与变异来对齐控制流结构成功率低且复杂化修复,并忽略基本块角色导致不必要修复。BRAFAR的核心是双向重构算法与由粗到细故障定位:前者以受引导方式对正确与错误程序都施加保持语义的重构操作,从而对齐控制流结构;后者根据所在语句及基本块自身语义,识别真正需要修复的基本块。在公开数据集1783份真实错误学生提交上,BRAFAR显著优于Refactory和Clara,能在更短时间内为更多错误程序生成正确且补丁更小的修复。

问题
如何为入门编程作业中的错误学生提交自动生成准确反馈与修复,现有Refactory因随机对齐控制流和逐块修复而成功率低且补丁冗余。
方法
提出BRAFAR,包含双向重构算法(对正确和错误程序施加保持语义的重构以对齐控制流结构)和由粗到细故障定位(依据语句与基本块语义识别真正需修复的块)。
评估
在公开数据集1783份真实错误学生提交上,与Refactory和Clara对比,BRAFAR生成更多正确修复、补丁更小且耗时更短。
原文摘要(Abstract)

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 原文 ·

BibTeX
@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}
}