Software Fault Localization Approach with Coverage Matrix Optimization Boosted by LLM-Based Code Naturalness
Applied Sciences · 30.04.2026 · 16 (9) · 4416
DOI: 10.3390/app16094416 ↗Kurz gefasst
Fachartikel in der Zeitschrift Applied Sciences, online erschienen am 30.04.2026. Verfasst von Wen Yao und 2 weiteren Autor:innen. Die Arbeit nennt 44 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
Spectrum-based fault localization (SBFL), one of the typical types of software fault localization techniques, has been widely adopted to assist developers in identifying faulty program elements. However, conventional SBFL techniques rely solely on test coverage statistics and overlook intrinsic characteristics of the source code itself. To fill this gap, this study proposes an enhanced SBFL approach, code-naturalness-based fault localization (CNFL), which incorporates code naturalness evaluated by a large language model (LLM) in the pipeline of SBFL. By weighting program statements according to their naturalness scores, CNFL prioritizes statements that deviate from typical coding patterns and therefore optimizes the coverage matrix for effective fault localization. Comprehensive experiments are conducted on the Defects4J dataset with five representative SBFL formulas and five LLMs for naturalness evaluation. The results demonstrate that CNFL significantly outperforms conventional SBFL techniques. Specifically, it boosts the Top-1 fault localization hit rate by up to 60.8% and 56.8% when applied to classic SBFL formulas like Jaccard and Ochiai, respectively. Moreover, CNFL is further confirmed to consistently surpass both standalone LLM methods and representative fault localization approaches that primarily optimize the coverage matrix.
Zitieren
APA
Yao, W., Jiang, M., & Zhou, Y. (2026). Software Fault Localization Approach with Coverage Matrix Optimization Boosted by LLM-Based Code Naturalness. Applied Sciences, 16(9), 4416. https://doi.org/10.3390/app16094416
Vancouver
Yao W, Jiang M, Zhou Y. Software Fault Localization Approach with Coverage Matrix Optimization Boosted by LLM-Based Code Naturalness. Applied Sciences. 2026;16(9):4416. doi:10.3390/app16094416
BibTeX
@article{Yao2026,
author = {Yao, Wen and Jiang, Mingyue and Zhou, Yuan},
title = {Software Fault Localization Approach with Coverage Matrix Optimization Boosted by LLM-Based Code Naturalness},
journal = {Applied Sciences},
year = {2026},
volume = {16},
number = {9},
pages = {4416},
doi = {10.3390/app16094416}
}
EUVIMED