Lune

ISSTA2024Top-tier venue

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

Linna Xie, Chongmin Li, Yu Pei, Tian Zhang, Minxue Pan

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • PyDex: Repairing Bugs in Introductory Python Assignments using LLMs cites Context-aware and data-driven feedback generation for programming assignments
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on3

  1. PyDex: Repairing Bugs in Introductory Python Assignments using LLMsJialu Zhang, José Pablo Cambronero, Sumit Gulwani, Vu Le et al.OOPSLA 2024 · 38 citations
  2. Context-aware and data-driven feedback generation for programming assignmentsDowon Song, Woosuk Lee, Hakjoo OhFSE 2021 · 22 citations
  3. Concept-Based Automated Grading of CS-1 Programming AssignmentsZhiyu Fan, Shin Hwei Tan, Abhik RoychoudhuryISSTA 2023 · 5 citations

Related papers

  1. Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault LocalizationPedro Orvalho, Mikolás Janota, Vasco M. ManquinhoAAAI 2025 · 4 citations
  2. FastFixer: An Efficient and Effective Approach for Repairing Programming AssignmentsFang Liu, Zhenwei Liu, Qianhui Zhao, Jing Jiang et al.ASE 2024 · 4 citations
  3. ErrorCLR: Semantic Error Classification, Localization and Repair for Introductory Programming AssignmentsSiqi Han, Yu Wang, Xuesong LuSIGIR 2023 · 9 citations
  4. RePurr: Automated Repair of Block-Based Learners' ProgramsSebastian Schweikl, Gordon FraserFSE 2025
  5. Automated Feedback Generation for Competition-Level CodeJialu Zhang, De Li, John Charles Kolesar, Hanyuan Shi et al.ASE 2022 · 16 citations
Dusk over the sea between two cliffs drawn in fine vertical lines