Software Defect Prediction Model Fusing File and Program Graph Representation

ABSTRACT Software defect prediction (SDP) endeavours to forecast defects in a project during its early stages by using data from the current or previous versions. An essential challenge in SDP is the effective integration of comprehensive code information, such as dependencies between files and structural information, to form optimal feature representations for SDP. To tackle this issue, we propose a hierarchical SDP model based on graph neural networks, which consists of two layers: file‐ and program‐level, which integrate the software information of both the file and program‐level graph representations (FPGR). In this setup, we utilize the code features obtained from the file‐level GNN as the initial node features for the program‐level GAT. This effectively addresses the issue in previous methods where static or structural features used as initial node features were insufficient for representing defect information, resulting in poor prediction performance. Subsequently, a project‐level defect‐aware graph attention network fuses interclass dependency information, comprehensively mining different levels of software representation graphs to construct superior feature representations. The defect‐aware graph attention network assigns differentiated weights to nodes of different categories during message passing, introducing a category weighting mechanism to mitigate the negative impact of class imbalance and the ‘homophily assumption’ in graph neural networks. Our experiments, conducted on 14 open‐source projects, reveal that FPGR performs better in within‐version SDP tasks, and our enhancements have indeed improved the model's performance to some extent. However, our performance in cross‐version SDP is not particularly satisfactory, although it is comparable to existing methods. We also discuss the impact of the hyperparameter and observe its influence on the model's ability to classify defective files.

Authors

Institutions

Publication Details

Journal
Software Testing Verification and Reliability
Published
2026-11-05
DOI
https://doi.org/10.1002/stvr.70032
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Software Defect Prediction Model Fusing File and Program Graph Representation

Jiayin Wang, Xin Lai, Xianglu Zhou, Xiaoyan Zhu et al.
Software Testing Verification and Reliability
Software Engineering Research
article

Software Defect Prediction Model Fusing File and Program Graph Representation

Jiayin Wang, Xin Lai, Xianglu Zhou, Xiaoyan Zhu, Yu Wang, Shuang Tian, Xiaobo Li
article en

Abstract

ABSTRACT Software defect prediction (SDP) endeavours to forecast defects in a project during its early stages by using data from the current or previous versions. An essential challenge in SDP is the effective integration of comprehensive code information, such as dependencies between files and structural information, to form optimal feature representations for SDP. To tackle this issue, we propose a hierarchical SDP model based on graph neural networks, which consists of two layers: file‐ and program‐level, which integrate the software information of both the file and program‐level graph representations (FPGR). In this setup, we utilize the code features obtained from the file‐level GNN as the initial node features for the program‐level GAT. This effectively addresses the issue in previous methods where static or structural features used as initial node features were insufficient for representing defect information, resulting in poor prediction performance. Subsequently, a project‐level defect‐aware graph attention network fuses interclass dependency information, comprehensively mining different levels of software representation graphs to construct superior feature representations. The defect‐aware graph attention network assigns differentiated weights to nodes of different categories during message passing, introducing a category weighting mechanism to mitigate the negative impact of class imbalance and the ‘homophily assumption’ in graph neural networks. Our experiments, conducted on 14 open‐source projects, reveal that FPGR performs better in within‐version SDP tasks, and our enhancements have indeed improved the model's performance to some extent. However, our performance in cross‐version SDP is not particularly satisfactory, although it is comparable to existing methods. We also discuss the impact of the hyperparameter and observe its influence on the model's ability to classify defective files.

Software Testing Verification and ReliabilityVol. 36(8)
Thermal Power Research Institute (CN), Xi'an Jiaotong University (CN)
Openalex Percentile: Top 9%
Software Engineering Research
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.

Laika access coming soon