Litcius/Paper detail

Graph Neural Network for Source Code Defect Prediction

Lucija Šikić, Adrian Satja Kurdija, Klemo Vladimir, Marin Šilić

2022IEEE Access62 citationsDOIOpen Access PDF

Abstract

Predicting defective software modules before testing is a useful operation that ensures that the time and cost of software testing can be reduced. In recent years, several models have been proposed for this purpose, most of which are built using deep learning-based methods. However, most of these models do not take full advantage of a source code as they ignore its tree structure or they focus only on a small part of a code. To investigate whether and to what extent information from this structure can be beneficial in predicting defective source code, we developed an end-to-end model based on a convolutional graph neural network (GCNN) for defect prediction, whose architecture can be adapted to the analyzed software, so that projects of different sizes can be processed with the same level of detail. The model processes the information of the nodes and edges from the abstract syntax tree (AST) of the source code of a software module and classifies the module as defective or not defective based on this information. Experiments on open source projects written in Java have shown that the proposed model performs significantly better than traditional defect prediction models in terms of AUC and F-score. Based on the F-scores of the existing <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">state-of-the-art</i> models, the model has shown comparable predictive capabilities for the analyzed projects.

Topics & Concepts

Computer scienceSource codeJavaAbstract syntax treeCode (set theory)Static program analysisGraphSoftwareArtificial intelligenceProgramming languageData miningSyntaxArtificial neural networkMachine learningSoftware developmentTheoretical computer scienceSet (abstract data type)Software Engineering ResearchSoftware System Performance and ReliabilitySoftware Reliability and Analysis Research