Skip to content
Conference

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

Jul 2026 · Annual International Computer Software and Applications Conference · pp. 356-365 · 0 citations · 36 references

Abstract

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) and must fit within a strict context budget. Naive concatenation either truncates critical evidence or amplifies noisy artifacts, especially for deep bugs where the failure symptom is far from the root cause. We present TraceStructRepair, a diagnostic structuring and budgeting approach for execution-aware self-supervised APR. TraceStructRepair (1) extracts a compact set of execution diagnostics from a single failing test, including exception type and message, stack trace frames, assertion diffs, and optionally dynamically loaded classes; (2) normalizes and ranks diagnostic elements to reduce redundancy and framework noise; and (3) assembles a field-aware representation under a fixed token budget with per-field caps and lexicographic priority rules. We implement TraceStructRepair on top of the SelfAPR pipeline and evaluate it on Defects4J using a project-wise heldout protocol. Beyond end-to-end repair outcomes, we analyze robustness under noisy fault localization and component ablations. We release artifacts to facilitate replication and future work on execution-aware, budget-constrained APR.

View source

Similar papers

TraceGate: Policy-Based Disclosure of Structured Crash Evidence for LLM-Assisted Debugging

Overall, TraceGate shows that rethinking debugging through controlled observability, rather than relying solely on stronger models or larger prompts, can make LLM-assisted repair more effective, efficient and controllable.

Nicolas Schuler, †. MateVincenzoScotti, †. RaffaelaMirandola · 0 citations
Preprint Aug 2026

Escaping the Self-Repair Trap: Improving Test Oracle Generation via Dual-Context Awareness

DCAware is proposed, a computationally efficient, non-iterative framework that prioritizes high signal-to-noise contextual grounding over multi-round repair and improving contextual quality is more effective than adding iterative repair complexity in the studied regression-oracle setting.

Ke-Shen Li, Hong Yu, Yuan Yuan · 0 citations
Book Open access Aug 2026

From Tool Traces to Strategy Banks: Mining Failure Signatures for Budgeted Repository-Level Code Repair

Repository-level code repair generates rich tool traces, but most LLM agents discard this data and keep restarting from a fixed debugging loop. We present Evolutionary Self-Debugging Agents (ESDA), which mines tool traces into structured failure signatures and uses them to maintain a strategy bank of reusable debugging policies. Policies are stored as modular prompt genomes with typed slots, enabling slot-level reuse, mutation, and crossover as new tasks arrive. A cost-aware ranking objective prioritizes strategies that are likely to succeed in the first few evaluator calls under tight budgets. On RepoBench, ESDA solves 58.4% of tasks within the first two evaluator calls and reduces median wall-clock time by 3.0x compared to strong baselines. We further analyze transfer across languages and build systems and find that mining failure signatures yields consistent gains under distribution shift.

Shuang Cao, Rui Li · 0 citations
Preprint Aug 2026

FaultLens: Learning Compact Behavioral Test Suites for Generated Operational Programs

Generated operational programs are often validated with either a few hand-written examples or exhaustive regression suites. The former can miss sparse boundary and interaction faults, while the latter can be unnecessarily expensive. We introduce FaultLens, a method for learning compact behavioral test suites while preserving an auditable connection to executed evidence. It executes a rich probe domain once, stores the fault-probe kill relation as a sparse outcome cache, and learns probe orderings only from earlier program generations. A fault-driven greedy component exploits known kill structure, while a mutation-independent diversity component covers probe families, cases, templates, and temporal bins. Their alternating hybrid remains useful when a new program contains a fault mechanism absent from ordering construction. We evaluate twenty generated operational policies across four environments, ten execution seeds, 1,200 measured run summaries, 2,160 controlled program transformations, and 4,120,200 executed program-probe pairs. Of 1,960 intended faulty transformations, 1,779 alter a contract or output somewhere in the finite audit domain; 200 additional controls preserve behavior. A 32-probe hybrid learned on generations 1-3 covers 576/582 (99.0%) dynamically killable faults in generations 4-5 using 1.2-2.0% of the exhaustive domain. With an entire fault family withheld from training, diversity raises scenario-family macro coverage from 84.6% to 94.9%. In a downstream deployment study, a conservative admission rule reduces severe tail regressions from 15/20 program-environment groups to 0/20. FaultLens provides a prioritized evidence mechanism, not a proof of correctness, and makes its budget, evidence source, generalization split, and misses explicit.

Zejun Liu, Hang Lyu, Jing-Tao Zhang · 0 citations
Preprint Aug 2026

RepairFormer: Automated Repair of Structured Inputs Using Transformers

Structured input files such as JSON, DOT, OBJ, INI, S-expression, and TinyC are widely used in software systems, but small corruptions can cause parsers to reject otherwise useful data. Repairing such inputs is important because malformed configuration, program, and data files can interrupt testing, analysis, deployment, and downstream automation even when most of the original content remains intact. Existing repair techniques can produce structurally valid inputs, but they often rely on deletion or repeated search, which may lose original content and result in semantic incorrectness. This paper presents RepairFormer, a transformer-based framework for structured input repair. The approach formulates repair as a supervised sequence generation task and uses format tags, oracle validation, and boundary-localized repair to generate valid outputs while preserving content. The boundary workflow focuses generation on the detected fault region, reducing the input size, and supporting repair of longer files. In evaluation, RepairFormer achieves a 88% in repair and 94% in recovery, showing strongest content preservation when repairs are successful. Additional experiments on our benchmark shows RepairFormer repairs 97.57% and recovers 94.29% with 5x faster runtime compared to state of the art.

Ovi Paul, Tom J King, Ali Shokri · 0 citations
Open access Aug 2026

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

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.

Mengtian Cui, Yangfan Liu, Zhibo Lu et al. · 0 citations