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 <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">small code scope</i> (i.e., a method or a class), which struggles to diagnose bugs for a <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">large code scope</i> (i.e., an entire software system). To address the limitation, this paper presents S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL models the FL task as a three-step process, which involves comprehension, navigation, and confirmation. Within specific steps, S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL with the ablation study and demonstrate the usability of S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL through a user study. Finally, the cost analysis shows that S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL spends an average of only 0.081 dollars and 92 seconds for a single bug.

Authors

Institutions

Publication Details

Journal
IEEE Transactions on Software Engineering
Published
2025-02-18
DOI
https://doi.org/10.1109/tse.2025.3543187
Citations
11
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
25.39
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

SoapFL: A Standard Operating Procedure for LLM-Based Method-Level Fault Localization

Yiling Lou, Kaixin Wang, Xiaoguang Mao, Shangwen Wang et al.
11 citations
IEEE Transactions on Software Engineering
Software Testing and Debugging Techniques
25.39
article

SoapFL: A Standard Operating Procedure for LLM-Based Method-Level Fault Localization

Yiling Lou, Kaixin Wang, Xiaoguang Mao, Shangwen Wang, Yihao Qin, Xiaoling Li, Jinhao Dong
article en
11 citations

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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">small code scope</i> (i.e., a method or a class), which struggles to diagnose bugs for a <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">large code scope</i> (i.e., an entire software system). To address the limitation, this paper presents S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL models the FL task as a three-step process, which involves comprehension, navigation, and confirmation. Within specific steps, S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">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 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL with the ablation study and demonstrate the usability of S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL through a user study. Finally, the cost analysis shows that S<sc xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">oap</small>FL spends an average of only 0.081 dollars and 92 seconds for a single bug.

IEEE Transactions on Software EngineeringVol. 51(4)
National University of Defense Technology (CN), Peking University (CN), Fudan University (CN)
Openalex Percentile: Top 0%
Software Testing and Debugging Techniques
25.39
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.