Software Defect Prediction Based on Deep Representation Learning of Source Code From Contextual Syntax and Semantic Graph

被引:9
|
作者
Abdu, Ahmed [1 ]
Zhai, Zhengjun [1 ]
Abdo, Hakim A. [2 ]
Algabri, Redhwan [3 ]
机构
[1] Northwestern Polytech Univ, Sch Software, Xian 710072, Peoples R China
[2] Hodeidah Univ, Dept Comp Sci, Al Hudaydah 3114, Yemen
[3] Hanyang Univ, Res Inst Engn & Technol, Ansan 15588, South Korea
关键词
Contextual representations; deep learning; graphical representations; hierarchical convolutional neural network; software defect prediction (SDP); MODEL;
D O I
10.1109/TR.2024.3354965
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Software defect prediction approaches play an essential role in the software development life cycle to help developers predict defects early, thus, preventing wasted time and effort. Defect prediction techniques based on semantic features have recently gained success over approaches based on traditional features. Existing semantic features-based defect prediction approaches use a single source code representation. Most studies focus on contextual syntax represented by abstract syntax trees, and some studies use a control flow graph to represent code graphs. However, a single representation is still limited for predicting defects that call multiple functions and have a high probability of false positives. To close the gap between source code representations on software defect prediction, we propose a defect prediction model based on multiple source code representations. The proposed model is a deep hierarchical convolutional neural network (DH-CNN). The syntax features extracted from abstract syntax trees using Word2vec are fed into syntax-level DH-CNN, and the semantic-graph features extracted from the control flow graph and data dependence graph using Node2vec are fed into semantic-level DH-CNN. In addition, the proposed model includes a gated merging mechanism that combines DH-CNN outputs to estimate the combination ratio of both types of features. Experimental results indicate that DH-CNN outperforms existing methods under cross-project and within-project scenarios.
引用
收藏
页码:820 / 834
页数:15
相关论文
共 50 条
  • [31] SeDPGK: Semi-supervised software defect prediction with graph representation learning and knowledge distillation
    Liu, Wangshu
    Yue, Ye
    Chen, Xiang
    Gu, Qing
    Zhao, Pengzhan
    Liu, Xuejun
    Zhao, Jianjun
    INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 174
  • [32] An Unbiased Transformer Source Code Learning with Semantic Vulnerability Graph
    Islam, Nafis Tanveer
    Parra, Gonzalo De La Torre
    Manuel, Dylan
    Bou-Harb, Elias
    Najafirad, Peyman
    2023 IEEE 8TH EUROPEAN SYMPOSIUM ON SECURITY AND PRIVACY, EUROS&P, 2023, : 144 - 159
  • [33] An Approach to Software Defect Prediction Combining Semantic Features and Code Changes
    Tao, Chuanqi
    Wang, Tao
    Guo, Hongjing
    Zhang, Jingxuan
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2022, 32 (09) : 1345 - 1368
  • [34] Defect Prediction With Semantics and Context Features of Codes Based on Graph Representation Learning
    Xu, Jiaxi
    Wang, Fei
    Ai, Jun
    IEEE TRANSACTIONS ON RELIABILITY, 2021, 70 (02) : 613 - 625
  • [35] Software Defect Prediction Based on Hybrid Swarm Intelligence and Deep Learning
    Li, Zhen
    Li, Tong
    Wu, YuMei
    Yang, Liu
    Miao, Hong
    Wang, DongSheng
    COMPUTATIONAL INTELLIGENCE AND NEUROSCIENCE, 2021, 2021
  • [36] A Model Based on Program Slice and Deep Learning for Software Defect Prediction
    Tian, Junfeng
    Tian, Yongqing
    2020 29TH INTERNATIONAL CONFERENCE ON COMPUTER COMMUNICATIONS AND NETWORKS (ICCCN 2020), 2020,
  • [37] Semantic and traditional feature fusion for software defect prediction using hybrid deep learning model
    Abdu, Ahmed
    Zhai, Zhengjun
    Abdo, Hakim A.
    Algabri, Redhwan
    Al-masni, Mohammed A.
    Muhammad, Mannan Saeed
    Gu, Yeong Hyeon
    SCIENTIFIC REPORTS, 2024, 14 (01):
  • [38] An Approach to Semantic and Structural Features Learning for Software Defect Prediction
    Shi, Meilong
    He, Peng
    Xiao, Haitao
    Li, Huixin
    Zeng, Cheng
    MATHEMATICAL PROBLEMS IN ENGINEERING, 2020, 2020 (2020)
  • [39] Software Defect Prediction Based on Machine Learning and Deep Learning Techniques: An Empirical Approach
    Albattah, Waleed
    Alzahrani, Musaad
    AI, 2024, 5 (04) : 1743 - 1758
  • [40] An Empirical Study on Vulnerability Detection for Source Code Software based on Deep Learning
    Lin, Wei
    Cai, Saihua
    2021 21ST INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY COMPANION (QRS-C 2021), 2021, : 1159 - 1160