SoapFL:基于llm的方法级故障定位的标准操作流程

IF 5.6 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Yihao Qin;Shangwen Wang;Yiling Lou;Jinhao Dong;Kaixin Wang;Xiaoling Li;Xiaoguang Mao
{"title":"SoapFL:基于llm的方法级故障定位的标准操作流程","authors":"Yihao Qin;Shangwen Wang;Yiling Lou;Jinhao Dong;Kaixin Wang;Xiaoling Li;Xiaoguang Mao","doi":"10.1109/TSE.2025.3543187","DOIUrl":null,"url":null,"abstract":"Fault Localization (FL) is an essential step during the debugging process. With the strong capabilities of code comprehension, the recent Large Language Models (LLMs) have demonstrated promising performance in diagnosing bugs in the code. Nevertheless, due to LLMs’ limited performance in handling long contexts, existing LLM-based fault localization remains on localizing bugs within a <italic>small code scope</i> (i.e., a method or a class), which struggles to diagnose bugs for a <italic>large code scope</i> (i.e., an entire software system). To address the limitation, this paper presents S<sc>oap</small>FL, which builds an LLM-driven standard operating procedure (SOP) to automatically localize buggy methods from the entire software. By simulating the behavior of a human developer, S<sc>oap</small>FL models the FL task as a three-step process, which involves comprehension, navigation, and confirmation. Within specific steps, S<sc>oap</small>FL provides useful test behavior or coverage information to LLM through program analysis. Particularly, we adopt a series of auxiliary strategies such as Test Behavior Tracking, Document-Guided Search, and Multi-Round Dialogue to overcome the challenges in each step. The evaluation on the widely used Defects4J-V1.2.0 benchmark shows that S<sc>oap</small>FL can localize 175 out of 395 bugs within Top-1, which outperforms the other LLM-based approaches and exhibits complementarity to the state-of-the-art learning-based techniques. Additionally, we confirm the indispensability of the components in S<sc>oap</small>FL with the ablation study and demonstrate the usability of S<sc>oap</small>FL through a user study. Finally, the cost analysis shows that S<sc>oap</small>FL spends an average of only 0.081 dollars and 92 seconds for a single bug.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"51 4","pages":"1173-1187"},"PeriodicalIF":5.6000,"publicationDate":"2025-02-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"SoapFL: A Standard Operating Procedure for LLM-Based Method-Level Fault Localization\",\"authors\":\"Yihao Qin;Shangwen Wang;Yiling Lou;Jinhao Dong;Kaixin Wang;Xiaoling Li;Xiaoguang Mao\",\"doi\":\"10.1109/TSE.2025.3543187\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Fault Localization (FL) is an essential step during the debugging process. With the strong capabilities of code comprehension, the recent Large Language Models (LLMs) have demonstrated promising performance in diagnosing bugs in the code. Nevertheless, due to LLMs’ limited performance in handling long contexts, existing LLM-based fault localization remains on localizing bugs within a <italic>small code scope</i> (i.e., a method or a class), which struggles to diagnose bugs for a <italic>large code scope</i> (i.e., an entire software system). To address the limitation, this paper presents S<sc>oap</small>FL, which builds an LLM-driven standard operating procedure (SOP) to automatically localize buggy methods from the entire software. By simulating the behavior of a human developer, S<sc>oap</small>FL models the FL task as a three-step process, which involves comprehension, navigation, and confirmation. Within specific steps, S<sc>oap</small>FL provides useful test behavior or coverage information to LLM through program analysis. Particularly, we adopt a series of auxiliary strategies such as Test Behavior Tracking, Document-Guided Search, and Multi-Round Dialogue to overcome the challenges in each step. The evaluation on the widely used Defects4J-V1.2.0 benchmark shows that S<sc>oap</small>FL can localize 175 out of 395 bugs within Top-1, which outperforms the other LLM-based approaches and exhibits complementarity to the state-of-the-art learning-based techniques. Additionally, we confirm the indispensability of the components in S<sc>oap</small>FL with the ablation study and demonstrate the usability of S<sc>oap</small>FL through a user study. Finally, the cost analysis shows that S<sc>oap</small>FL spends an average of only 0.081 dollars and 92 seconds for a single bug.\",\"PeriodicalId\":13324,\"journal\":{\"name\":\"IEEE Transactions on Software Engineering\",\"volume\":\"51 4\",\"pages\":\"1173-1187\"},\"PeriodicalIF\":5.6000,\"publicationDate\":\"2025-02-18\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IEEE Transactions on Software Engineering\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://ieeexplore.ieee.org/document/10891926/\",\"RegionNum\":1,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/10891926/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

故障定位(FL)是调试过程中必不可少的步骤。由于具有强大的代码理解能力,最近的大型语言模型(llm)在诊断代码中的错误方面表现出了良好的性能。然而,由于llm在处理长上下文方面的性能有限,现有的基于llm的故障定位仍然停留在小代码范围内(例如,一个方法或一个类)的错误定位上,它很难诊断大代码范围(例如,整个软件系统)的错误。为了解决这个问题,本文提出了SoapFL,它构建了一个llm驱动的标准操作过程(SOP)来自动从整个软件中定位有缺陷的方法。通过模拟人类开发人员的行为,SoapFL将FL任务建模为一个包含理解、导航和确认的三步过程。在特定的步骤中,SoapFL通过程序分析向LLM提供有用的测试行为或覆盖率信息。特别地,我们采用了一系列辅助策略,如测试行为跟踪、文档引导搜索和多轮对话来克服每个步骤中的挑战。对广泛使用的Defects4J-V1.2.0基准的评估表明,SoapFL可以在Top-1中的395个bug中定位175个,这优于其他基于llm的方法,并与最先进的基于学习的技术形成互补。此外,我们通过消融研究证实了SoapFL中组件的不可或缺性,并通过用户研究证明了SoapFL的可用性。最后,成本分析显示,SoapFL在单个bug上平均只花费0.081美元和92秒。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
SoapFL: A Standard Operating Procedure for LLM-Based Method-Level Fault Localization
Fault Localization (FL) is an essential step during the debugging process. With the strong capabilities of code comprehension, the recent Large Language Models (LLMs) have demonstrated promising performance in diagnosing bugs in the code. Nevertheless, due to LLMs’ limited performance in handling long contexts, existing LLM-based fault localization remains on localizing bugs within a small code scope (i.e., a method or a class), which struggles to diagnose bugs for a large code scope (i.e., an entire software system). To address the limitation, this paper presents SoapFL, which builds an LLM-driven standard operating procedure (SOP) to automatically localize buggy methods from the entire software. By simulating the behavior of a human developer, SoapFL models the FL task as a three-step process, which involves comprehension, navigation, and confirmation. Within specific steps, SoapFL provides useful test behavior or coverage information to LLM through program analysis. Particularly, we adopt a series of auxiliary strategies such as Test Behavior Tracking, Document-Guided Search, and Multi-Round Dialogue to overcome the challenges in each step. The evaluation on the widely used Defects4J-V1.2.0 benchmark shows that SoapFL can localize 175 out of 395 bugs within Top-1, which outperforms the other LLM-based approaches and exhibits complementarity to the state-of-the-art learning-based techniques. Additionally, we confirm the indispensability of the components in SoapFL with the ablation study and demonstrate the usability of SoapFL through a user study. Finally, the cost analysis shows that SoapFL spends an average of only 0.081 dollars and 92 seconds for a single bug.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include: a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models. b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects. c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards. d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues. e) System issues: Hardware-software trade-offs. f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信