CoverFL: Enhancing Fault Localization via Deep Coverage Relation
Wei Chen, Jiamou Liu, Kaiqi Zhao, Mingyue Zhang, Wu Chen · ACM Transactions on Software Engineering and Methodology · 2026
In the realm of software fault localization, identifying the root causes of failed test cases is crucial for enhancing accuracy. Current methods aim to establish connections between test cases and source code components, relying on representation learning to model these relationships. However, this approach encounters challenges when considering the numerous test cases associated with a program, each exerting unique influences on code elements, thus varying the relationship’s depth. To address this complexity, we construct a unified coverage graph based on code coverage data. Leveraging Graph Attention Networks (GAT), we capture intricate associations between program elements and diverse test cases. Furthermore, we devise a novel graph contrastive learning technique to facilitate the discovery of profound links between faulty code components and failed test cases. Our model’s efficacy is substantiated through experiments on the widely used Defects4J (V-1.2.0) dataset in the software fault localization domain. Results reveal our model’s superiority over baseline models in key metrics, including Top-1, Top-3, Top-5 rankings. Particularly noteworthy, our model identifies 41 more faults in the Top-1 category than state-of-the-art methods. Furthermore, when evaluated in cross-project scenarios, our model consistently outperforms other approaches, underscoring its robustness and optimality.