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
- Jehad Ali (ORCID: https://orcid.org/0000-0002-0589-7924)
- Rafaqat Kazmi
- Afnan Aldhahri (ORCID: https://orcid.org/0000-0001-6881-1131)
- Yulin Wang
- Aqsa
Institutions
- University of Nottingham Ningbo China (CN)
- Umm al-Qura University (SA)
- Wuhan University (CN)
- Ajou University (KR)
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
- Umm Al-Qura University