Software defect prediction with semantic and structural information of codes based on Graph Neural Networks

被引:23
|
作者
Zhou, Chunying [1 ]
He, Peng [1 ]
Zeng, Cheng [1 ]
Ma, Ju [1 ]
机构
[1] Hubei Univ, Sch Comp Sci & Informat Engn, Wuhan, Peoples R China
基金
国家重点研发计划;
关键词
Software defect prediction; Class Dependency Network; Convolutional Neural Network; Graph Convolutional Network;
D O I
10.1016/j.infsof.2022.107057
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: Most defect prediction methods consider a series of traditional manually designed static code metrics. However, only using these hand-crafted features is impractical. Some researchers use the Convolutional Neural Network (CNN) to capture the potential semantic information based on the program's Syntax Trees (ASTs). In recent years, leveraging the dependency relationships between software modules to construct a software network and using network embedding models to capture the structural information have been helpful in defect prediction. This paper simultaneously takes the semantic and structural information into account and proposes a method called CGCN. Objective: This study aims to validate the feasibility and performance of the proposed method in software defect prediction. Method: Abstract Syntax Trees and a Class Dependency Network (CDN) are first generated based on the source code. For ASTs, symbolic tokens are extracted and encoded into vectors. The numerical vectors are then used as input to the CNN to capture the semantic information. For CDN, a Graph Convolutional Network (GCN) is used to learn the structural information of the network automatically. Afterward, the learned semantic and structural information are combined with different weights. Finally, we concatenate the learned features with traditional hand-crafted features to train a classifier for more accurate defect prediction. Results: The proposed method outperforms the state-of-the-art defect prediction models for both within-project prediction (including within-version and cross-version) and cross-project prediction on 21 open-source projects. In general, within-version prediction achieves better performance in the three prediction tasks.Conclusion: The proposed method of combining semantic and structural information can improve the performance of software defect prediction.
引用
收藏
页数:20
相关论文
共 50 条
  • [1] Research of Software Defect Prediction Model Based on Complex Network and Graph Neural Network
    Cui, Mengtian
    Long, Songlin
    Jiang, Yue
    Na, Xu
    ENTROPY, 2022, 24 (10)
  • [2] Investigating The Use of Deep Neural Networks for Software Defect Prediction
    Samir, Mohamed
    El-Ramly, Mohammad
    Kamel, Amr
    2019 IEEE/ACS 16TH INTERNATIONAL CONFERENCE ON COMPUTER SYSTEMS AND APPLICATIONS (AICCSA 2019), 2019,
  • [3] On the Effectiveness of Cost Sensitive Neural Networks for Software Defect Prediction
    Muthukumaran, K.
    Dasgupta, Amrita
    Abhidnya, Shirode
    Neti, Lalita Bhanu Murthy
    PROCEEDINGS OF THE EIGHTH INTERNATIONAL CONFERENCE ON SOFT COMPUTING AND PATTERN RECOGNITION (SOCPAR 2016), 2018, 614 : 557 - 570
  • [4] Automated Parameter Tuning of Artificial Neural Networks for Software Defect Prediction
    Yang, Zhao
    Qian, Hongbing
    ICAIP 2018: 2018 THE 2ND INTERNATIONAL CONFERENCE ON ADVANCES IN IMAGE PROCESSING, 2018, : 203 - 209
  • [5] Improved Bayesian regularisation using neural networks based on feature selection for software defect prediction
    Jayanthi, R.
    Florence, M. Lilly
    INTERNATIONAL JOURNAL OF COMPUTER APPLICATIONS IN TECHNOLOGY, 2019, 60 (03) : 225 - 241
  • [6] A Software Defect Prediction Method Based on Program Semantic Feature Mining
    Yao, Wenjun
    Shafiq, Muhammad
    Lin, Xiaoxin
    Yu, Xiang
    ELECTRONICS, 2023, 12 (07)
  • [7] Improved Approach for Software Defect Prediction using Artificial Neural Networks
    Sethi, Tanvi
    Gagandeep
    2016 5TH INTERNATIONAL CONFERENCE ON RELIABILITY, INFOCOM TECHNOLOGIES AND OPTIMIZATION (TRENDS AND FUTURE DIRECTIONS) (ICRITO), 2016, : 480 - 485
  • [8] A Fine-Grained Defect Prediction Method Based on Drift-Immune Graph Neural Networks
    Yang, Fengyu
    Zhong, Fa
    Wei, Xiaohui
    Zeng, Guangdong
    CMC-COMPUTERS MATERIALS & CONTINUA, 2025, 82 (02): : 3563 - 3590
  • [9] Convolutional Neural Networks over Control Flow Graphs for Software Defect Prediction
    Anh Viet Phan
    Minh Le Nguyen
    Lam Thu Bui
    2017 IEEE 29TH INTERNATIONAL CONFERENCE ON TOOLS WITH ARTIFICIAL INTELLIGENCE (ICTAI 2017), 2017, : 45 - 52
  • [10] Software defect prediction employing BiLSTM and BERT-based semantic feature
    Md Nasir Uddin
    Bixin Li
    Zafar Ali
    Pavlos Kefalas
    Inayat Khan
    Islam Zada
    Soft Computing, 2022, 26 : 7877 - 7891