跳到主要导航 跳到搜索 跳到主要内容

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

  • Mengtian Cui
  • , Yangfan Liu
  • , Zhibo Lu
  • , Yancui Hu
  • , Peican Zhu
  • Southwest University for Nationalities

科研成果: 期刊稿件文章同行评审

摘要

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.

源语言英语
期刊论文编号117
期刊Automated Software Engineering
33
4
DOI
出版状态已出版 - 12月 2026

学术指纹

探究 'StructFix: a structure-aware reasoning framework for automated program repair with code property graphs' 的科研主题。它们共同构成独一无二的学术指纹。

引用此