用智能体框架自动复现软件缺陷,提升修复效率。
AEGIS: An Agent-based Framework for General Bug Reproduction from Issue Descriptions
- 设计基于智能体的框架,分步处理缺陷描述并生成脚本
- 在公开数据集上比现有方法高23.0%的复现准确率
- 适合软件维护人员和自动化测试研究者使用
在软件维护中,缺陷复现对故障定位与修复至关重要。手动编写复现脚本耗时且要求高,因此自动化复现日益受关注。然而,现有研究多局限于特定缺陷类型(如程序崩溃),难以推广至通用场景。本文针对此问题,提出首个基于智能体的通用缺陷复现框架AEGIS。该框架包含两个核心模块:(1) 精简上下文构建模块,引导代码智能体从缺陷描述中提取结构化信息、识别相关代码并整合成简洁上下文;(2) 基于有限状态机(FSM)的多反馈优化模块,通过多维度反馈调控智能体行为,实现可控高效的脚本生成。在公开基准数据集上的实验表明,AEGIS在F→P指标上比最先进基线高出23.0%。此外,AEGIS生成的复现脚本可使无智能体方法的缺陷解决率相对提升12.5%。
原文摘要 · Abstract (English)
In software maintenance, bug reproduction is essential for effective fault localization and repair. Manually writing reproduction scripts is a time-consuming task with high requirements for developers. Hence, automation of bug reproduction has increasingly attracted attention from researchers and practitioners. However, the existing studies on bug reproduction are generally limited to specific bug types such as program crashes, and hard to be applied to general bug reproduction. In this paper, considering the superior performance of agent-based methods in code intelligence tasks, we focus on designing an agent-based framework for the task. Directly employing agents would lead to limited bug reproduction performance, due to entangled subtasks, lengthy retrieved context, and unregulated actions. To mitigate the challenges, we propose an Automated gEneral buG reproductIon Scripts generation framework, named AEGIS, which is the first agent-based framework for the task. AEGIS mainly contains two modules: (1) A concise context construction module, which aims to guide the code agent in extracting structured information from issue descriptions, identifying issue-related code with detailed explanations, and integrating these elements to construct the concise context; (2) A FSM-based multi-feedback optimization module to further regulate the behavior of the code agent within the finite state machine (FSM), ensuring a controlled and efficient script generation process based on multi-dimensional feedback. Extensive experiments on the public benchmark dataset show that AEGIS outperforms the state-of-the-art baseline by 23.0% in F->P metric. In addition, the bug reproduction scripts generated by AEGIS can improve the relative resolved rate of Agentless by 12.5%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。