arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.07326cs.SE
收藏

Echo:基于图的检索与执行反馈的缺陷重现测试生成

Echo: Graph-Enhanced Retrieval and Execution Feedback for Issue Reproduction Test Generation

Nanjing University(南京大学);University College London(伦敦大学学院);NOFA(诺发);University of Texas at Dallas(德克萨斯大学达拉斯分校)

Zhiwei Fei, Yue Pan, Federica Sarro, Jidong Ge, Marc Liu, Vincent Ng, He Ye

AI总结:

Echo通过基于代码图的检索和执行反馈生成缺陷重现测试用例,提升测试生成效率与准确性。

摘要:

识别bug的根本原因对许多开发者来说仍然具有挑战性,因为bug报告通常缺乏能够可靠触发失败的缺陷重现测试用例。手动编写此类测试用例是耗时的,并且需要大量努力来理解代码库并隔离失败行为。为了解决这一挑战,我们提出了Echo,一个生成缺陷重现测试用例的代理,它在多个方面推进了先前的工作。在生成过程中,Echo通过利用代码图和一种新的自动查询细化策略来加强上下文检索。Echo还通过自动执行生成的测试用例改进了先前的工具,这是首次具有这种功能的特性,可以无缝集成到实际的开发工作流中。此外,Echo生成潜在的修补程序,并使用修补后的版本验证候选测试是否满足失败到通过的标准,并为细化提供可操作的反馈。与先前的缺陷重现代理不同,Echo为每个问题生成一个测试用例,提供了更好的成本-性能权衡。在SWT-Bench Verified上的实验表明,Echo在开源方法中建立了新的状态,达到了66.28%的成功率。

英文摘要:

Identifying the root cause of a bug remains difficult for many developers because bug reports often lack a bug reproducing test case that reliably triggers the failure. Manually writing such test cases is time-consuming and requires substantial effort to understand the codebase and isolate the failing behavior. To address this challenge, we propose Echo, an agent for generating issue reproducing test cases, which advances previous work in several ways. During generation, Echo strengthens context retrieval by leveraging a code graph and a novel automatic query-refinement strategy. Echo also improves upon previous tools by automatically executing generated test cases, a first-of-its-kind feature that seamlessly integrates into practical development workflows. In addition, Echo generates potential patches and uses the patched version to validate whether a candidate test meets the fail-to-pass criterion and to provide actionable feedback for refinement. Unlike prior bug-reproduction agents that sample and rank multiple candidate tests, Echo generates a single test per issue, offering a better cost-performance trade-off. Experiments on SWT-Bench Verified show that Echo establishes a new state of the art among open-source approaches, achieving a 66.28% success rate.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑