Adaptive semantic structural fault localization at statement level using reinforcement learning

Software fault localization is critical for reducing debugging effort, still much of the current literature focuses on a single major source of evidence and limited to fine-grained localization scenarios. Spectrum-based techniques are very efficient in using test execution behavior, but they can often do poorly when failures propagate across structurally related statements or when lexical clues provided by bugs are present in both text and source-code artifacts related to a bug. To overcome this limitation, this research presents RLSFLoc, which is a reinforcement learning based semantic structural framework to fault localization at the statement level. The proposed framework is a combination of three evidence streams: execution-based suspiciousness through passing and failing tests, structural dependencies refinement based on program relations, and semantic relevance computed based on bug-related textual artifacts and program entities. Instead of using fixed weights to combine these signals, RLSFLoc uses a Proximal Policy Optimization-based adaptive fusion policy to learn context-sensitive weighting in various localization scenarios. The framework was evaluated on Defects4J v3.0.1 with 854 active bugs and statement-level localization setting. The experimental results indicated that RLSFLoc had a high performance compared to the compared methods with 48.7% Top-1 accuracy, an MRR of 0.612, a MAP of 0.587, and the lowest EXAM score of 0.184. Also, proposed approach minimized the inspection workload and ensured the performance (which was consistent across various projects) was not affected. Overall, the results indicate that a successful and practical approach to localizing software faults on a fine-grained level is to adaptively integrate the execution-based, structural and semantic evidence.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-08-27
DOI
https://doi.org/10.1038/s41598-026-68091-8
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Adaptive semantic structural fault localization at statement level using reinforcement learning

Jehad Ali, Rafaqat Kazmi, Afnan Aldhahri, Yulin Wang et al.
Scientific Reports
Topic Modeling
article

Adaptive semantic structural fault localization at statement level using reinforcement learning

Jehad Ali, Rafaqat Kazmi, Afnan Aldhahri, Yulin Wang, Aqsa
article en

Abstract

Software fault localization is critical for reducing debugging effort, still much of the current literature focuses on a single major source of evidence and limited to fine-grained localization scenarios. Spectrum-based techniques are very efficient in using test execution behavior, but they can often do poorly when failures propagate across structurally related statements or when lexical clues provided by bugs are present in both text and source-code artifacts related to a bug. To overcome this limitation, this research presents RLSFLoc, which is a reinforcement learning based semantic structural framework to fault localization at the statement level. The proposed framework is a combination of three evidence streams: execution-based suspiciousness through passing and failing tests, structural dependencies refinement based on program relations, and semantic relevance computed based on bug-related textual artifacts and program entities. Instead of using fixed weights to combine these signals, RLSFLoc uses a Proximal Policy Optimization-based adaptive fusion policy to learn context-sensitive weighting in various localization scenarios. The framework was evaluated on Defects4J v3.0.1 with 854 active bugs and statement-level localization setting. The experimental results indicated that RLSFLoc had a high performance compared to the compared methods with 48.7% Top-1 accuracy, an MRR of 0.612, a MAP of 0.587, and the lowest EXAM score of 0.184. Also, proposed approach minimized the inspection workload and ensured the performance (which was consistent across various projects) was not affected. Overall, the results indicate that a successful and practical approach to localizing software faults on a fine-grained level is to adaptively integrate the execution-based, structural and semantic evidence.

Scientific Reports
University of Nottingham Ningbo China (CN), Umm al-Qura University (SA), Wuhan University (CN), Ajou University (KR)
Umm Al-Qura University
Reduced inequalities
Openalex Percentile: Top 8%
Topic Modeling
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.