Skip to content
Open access

StructFix: a structure-aware reasoning framework for automated program repair with code property graphs

Aug 2026 · International Conference on Automated Software Engineering · Vol 33 · 0 citations · 55 references

TL;DR

StructFix is proposed, a structure-aware APR framework that grounds masked patch generation in Code Property Graphs (CPGs), and explicitly coupling structural dependencies with masked generation improves repair effectiveness and enables transfer across datasets.

Abstract

Masked language models are increasingly used as the backbone of patch generation for automated program repair (APR). However, most Pre-trained Language Model (PLM)-based repair systems treat code as token sequences, underutilizing structural cues such as control and data dependencies. Consequently, they can produce test-passing patches that are not fully consistent with the intended behavior. We propose StructFix, a structure-aware APR framework that grounds masked patch generation in Code Property Graphs (CPGs). StructFix constructs method-level CPGs from the unmasked program context, encodes structural dependencies with a graph encoder, and integrates graph evidence into token representations through span-based token–node soft alignment and token-wise gated graph–text fusion. This design enables the model to use structural signals in a context-dependent manner while predicting masked tokens. StructFix correctly repairs 86 Defects4J v1.2 bugs, including 12 not repaired by any compared baseline, and repairs 30 Java and 28 Python defects on QuixBugs, which demonstrates cross-language robustness. Our experimental results show that explicitly coupling structural dependencies with masked generation improves repair effectiveness and enables transfer across datasets.

Read PDF

Similar papers

Preprint Aug 2026

GraphAlignCoder: Aligning Program and Proof Graphs for Code Generation

GraphAlignCoder is introduced, a training framework that transfers explicit correctness structure into code generation and consistently outperforms the base model, code-only SFT, and CodeRL across all benchmarks.

Yue-Ke Zhang, Zihan Fang, Kevin Leach et al. · 0 citations
Jul 2026

Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphs

Large language models (LLMs) have improved automated program repair (APR), but two limitations remain. First, raw execution traces are often too large and repetitive to serve as effective model context. Second, repeated patch sampling may produce different implementations without yielding distinct root-cause hypotheses...

Zhilin Huang, Ling Xu, Hongyu Zhang · 1 citation
Conference Jul 2026

TraceStructRepair: Effective Diagnostic Representation for Context-Limited Automated Program Repair

Self-supervised automated program repair (APR) leverages project-specific perturbations to generate training data and uses test execution diagnostics to guide patch generation. In practice, however, diagnostics are heterogeneous (e.g., exception messages, stack traces, assertion diffs, and dynamic execution signals) an...

Pan Lu, Dongcheng Li, W. E. Wong · 0 citations
Preprint Open access Aug 2026

CausalRepair: Bridging the Causality Gap in Large Language Model-Based Automated Program Repair via Dual-Slicing

CausalRepair is proposed, a conversation-driven APR framework based on minimal causal context, i.e., the essential dependencies required to explain a failure, outperforming state-of-the-art approaches such as ReinFix and TSAPR, while reducing the average repair cost to $0.029 per bug.

Lin-Hao Wu, Yi-Zhou Chen, Zhen Yang et al. · 0 citations
Jul 2026

OwlPath: Lossless Knowledge Compression for LLM Bug Repair

OwlPath is presented, an OWL2 reasoning layer atop CodeGraph, a widely used code intelligence platform with 500K+ GitHub stars, offering a unified CLI for structural code retrieval, with lossless knowledge compression.

Bo Zhang, Renke Pan, Huan Chen et al. · 0 citations
Jul 2026

Dependency-Guided Code Generation: Structured Matrix Decomposition and Consistency-Guided Refinement

This work proposes a dependency-aware code generation framework that explicitly models interactions among code entities through a graph-based representation, and introduces a sparse triplet representation for strong dependencies, significantly improving storage efficiency and computational scalability.

Ming-Qiao Mo, Yangcheng Zeng, Zikai Xiao et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.