Skip to content
Preprint

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

Aug 2026 · 0 citations · 56 references
Computer Science

TL;DR

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.

Abstract

Large Language Models (LLMs) have shown strong potential for regression-oracle completion, where a test prefix is given and the current program version is treated as expected behavior. Recent approaches increasingly rely on iterative self-repair and execution feedback, but optimizing execution success does not necessarily yield strong fault-revealing oracles. This objective, widely adopted in repair-based methods, serves only as a proxy and may be misaligned with the true goal of oracle generation. Such misalignment biases the repair process, giving rise to a feedback-driven degeneration that we term the Self-Repair Trap, where iterative repair progressively drives models toward assertions that are easier to satisfy but less effective at detecting faults. To address this issue, we propose DCAware, a computationally efficient, non-iterative framework that prioritizes high signal-to-noise contextual grounding over multi-round repair. DCAware integrates structured static context with selectively retrieved dynamic states, enabling precise and robust oracle generation without iterative feedback loops. Extensive experiments based on execution and mutation testing show that DCAware consistently improves fault-revealing effectiveness while maintaining high execution success, outperforming prior methods with substantially lower computational cost. Our results suggest that improving contextual quality is more effective than adding iterative repair complexity in the studied regression-oracle setting.

View source

Similar papers

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
2025

Beyond Oracle: Verifier-Supervision for Instruction Hierarchy in Reasoning and Instruction-Tuned LLMs

A unified supervision framework is introduced that embeds programmatically verifiable checkers into synthesized instruction-conflict instances, enabling alignment without oracle labels or reasoning traces, supporting both instruction-tuned and reasoning models.

Sian-Yao Huang, Li-Hsien Chang, Che-Yu Lin et al. · 4 citations
Review Aug 2026

Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair

This paper identifies patch verbosity as a major yet overlooked concern in LLM-based APR and proposes RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation that achieves a substantially better size-correctness tradeoff.

Wen-Qiang Luo, J. Keung, Xiaoyu Shi et al. · 1 citation
Preprint Jul 2026

From Failing to Passing: Evolving Natural Language Prompt Optimization Rules for LLM Code Generation

This work introduces a search-based approach that identifies and evolves a set of natural language transformation rules with strong downstream effects on coding performance, and proposes DUALFIX, a staged repair pipeline that combines the evolved transformation rules with execution-feedback repair, addressing both spec...

Amal Akli, Melissa Akli, Cedric Richter 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.