๐ค AI Summary
This work addresses a critical limitation in existing large language modelโbased test oracle generation methods, which rely on iterative self-repair and execution feedback and often fall into a โself-repair trap,โ producing assertions that pass yet fail to expose real faults. To overcome this, the paper proposes DCAware, a novel framework that introduces, for the first time, a dual-context awareness mechanism. This mechanism non-iteratively integrates structured static program context with selectively retrieved dynamic execution states to achieve high signal-to-noise ratio context awareness. By abandoning the conventional multi-round repair paradigm, DCAware simultaneously maintains high execution success rates while significantly enhancing both fault-revealing capability and computational efficiency, outperforming current state-of-the-art approaches across the board.
๐ 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.