Font Size: a A A

Research On Software Defect Prediction Based On Graph Neural Networks

Posted on:2024-09-06Degree:MasterType:Thesis
Country:ChinaCandidate:C Y ZhouFull Text:PDF
GTID:2568307106953289Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Software defect prediction techniques aim to predict the defect-prone modules in the software systems,which can efficiently help software developers to allocate the testing resources better.The existing studies usually focused on manually designed features.However,these traditional hand-crafted features have limited ability to capture information about the program.With the development of neural networks,convolutional neural networks(CNNs)are introduced in defect prediction for extracting rich syntactic and semantic information from software code.Subsequently,with the introduction of network metrics into the field of software defect prediction,the dependency network of software modules is widely used.Recently,graph neural networks(GNNs)have been proved to be an effective deep learning framework for learning graph data.As a variant of GNN,graph convolution neural network(GCN)has achieved appealing results in node classification and link prediction.This thesis simultaneously takes the semantic and structural information into account and proposes a method called CGCN based on CNN and GCN.Specifically,(1)Abstract Syntax Trees and a Class Dependency Network(CDN)are first generated based on the source code.(2)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.(3)For CDN,a Graph Convolutional Network(GCN)is used to learn the structural information of the network automatically.(4)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.We validate the effectiveness of the proposed method on seven open-source projects for three file-level tasks,including within-project prediction(within-version and cross-version)and cross-project prediction.The experimental results show that the proposed model outperforms the baselines,with the F1 value is up to 7.2%,and the AUC value is up to 6.6%.
Keywords/Search Tags:Software networks, Graph neural networks, Software defect prediction, Semantic features, Structural features
PDF Full Text Request
Related items