paperbot · PL 论文追踪

全部论文 待读 收藏

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

逃离自修复陷阱:通过双上下文感知改进测试 oracle 生成
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 1 inbox
Kefan Li, Hongyue Yu, Yuan Yuan
crossref: 2026-10-09

AI 速览

一句话:提出非迭代双上下文感知框架 DCAware,避免自修复陷阱,提升回归测试 oracle 的故障揭示能力且开销更低。

论文关注基于大语言模型的回归测试 oracle 补全:给定测试前缀,以当前程序版本作为期望行为生成断言。现有方法多依赖迭代自修复与执行反馈,但优化执行成功率只是代理目标,与真正目标——生成能揭示故障的 oracle——存在错位;这种错位会使修复过程逐步偏向更易满足却更弱效的断言,作者称之为“自修复陷阱”。为此提出 DCAware,一个计算高效的非迭代框架,强调高信噪比的上下文接地,将结构化静态上下文与选择性检索的动态状态结合,从而在无迭代反馈回路的条件下精确稳健地生成 oracle。基于执行与变异测试的广泛实验表明,DCAware 在保持高执行成功率的同时持续提升故障揭示效果,并以显著更低计算成本优于先前方法,说明提升上下文质量比增加迭代修复复杂度更有效。

问题
基于 LLM 的回归 oracle 补全方法常以执行成功率为优化目标,但该代理目标与生成能揭示故障的 oracle 之间存在错位,导致迭代自修复陷入“自修复陷阱”。
方法
提出非迭代框架 DCAware,融合结构化静态上下文与选择性检索的动态状态,优先高信噪比上下文接地,从而无需多轮修复即可生成 oracle。
评估
通过执行测试与变异测试进行广泛实验,比较故障揭示有效性和执行成功率,并评估计算成本。
原文摘要(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.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot12502,
  title = {Escaping the Self-Repair Trap: Improving Test Oracle Generation via Dual-Context Awareness},
  author = {Kefan Li and Hongyue Yu and Yuan Yuan},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834421}
}