Font Size: a A A

Research On Software Version Incremental Code Defect Detection Method Based On Graph Neural Network

Posted on:2022-05-22Degree:MasterType:Thesis
Country:ChinaCandidate:P LiFull Text:PDF
GTID:2518306521964449Subject:Software engineering
Abstract/Summary:
A software defect is a problem or error in the software or program that destroys the normal running ability of the program,and its existence will bring security risks to the software.As the scale of software becomes larger and its structure becomes more and more complex,how to find and fix software defects as early as possible in the process of software dynamic changes has become a hot spot for major software companies.Software Defect Prediction(SDP)aims to detect which modules in the current project may have defects through a certain method.Traditional software defect code detection adopts full detection method,which has low timeliness,and adopts characteristic information extracted by experts in the characterization of defect code,which consumes human resources and cannot fully learn the complex semantic structure information in the code.As the software development cycle becomes shorter and the software version changes frequently,how to efficiently detect software version defects becomes particularly important.In order to solve the above problems,this thesis proposes a method that combines version incremental code analysis and defective code detection.This method can calculate the incremental code through associated code analysis after software version change,and on this basis,the version change information of the project and the feature information of the code are combined and expressed into a graph format.Finally,it combines with the graph convolution neural network model to implement incremental code defect detection,which improves the detection efficiency.The specific research contents of this thesis are as follows:(1)Aiming at the problem of high false alarm rate caused by traditional correlation code analysis based on a single relationship,an incremental code generation method based on variable propagation path is proposed.On the one hand,we use the syntax tree-based graph matching method to determine the code that changes between versions,and reduce the influence of invalid codes such as invalid characters and comments in the code on the changing code generation.On the other hand,we propose a multi-relational composition method based on variable propagation paths to record the propagation paths of variables between functions,and summarize three association analysis rules to help determine the incremental code between versions.(2)Design and implement a code diagram representation method that integrates software version change information,and integrates the dynamic information of the software code during the version change process with the semantic structure information of the code to enrich the code feature representation.Finally,it is combined with graph convolutional neural network to realize defective code detection.(3)Implement and evaluate the software version incremental code defect detection system based on graph neural network proposed in this paper,and design multiple sets of experiments to verify the method proposed in this paper.Experiments show that this method is compared with traditional methods,whether in public data sets or open-source data set,the F-Measure of defect detection has been significantly improved.At the same time,the system uses incremental code analysis,which greatly reduces the amount of data to be tested between versions and further improves the efficiency of defect detection.
Keywords/Search Tags:Defect detection, Incremental code, Software version change, Graph Convolutional Network
Related items