Font Size: a A A

Research On Fine-grained Software Defect Prediction Based On Deep Learning

Posted on:2021-01-16Degree:MasterType:Thesis
Country:ChinaCandidate:J CaoFull Text:PDF
GTID:2428330623969140Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Traditional defect prediction technology mainly focuses on predicting coarse-grained objects such as files,modules,and packages in software projects.However,related technol ogies are difficult to apply in practice.For example,when a defect prediction model predic ts a large file with defects,The time and effort required for review is difficult for developer s to accept,and when a file is modified by multiple developers,it is more difficult to deter mine the appropriate developer to review the forecast file.The existing fine-grained defect prediction methods,including code-level and change-level prediction,have certain requirements for software warehouse corpora and change da ta,and it is difficult to perform effective defect prediction in the early stages of software de velopment.Under the premise of fine-grained forecasting requirements,this paper proposes a met hod for migrating cross-project code line-level defects based on API usage specifications t o the early stages of software projects,and implements effective defect prediction in the ea rly stages of software projects.In the later period,this paper proposes a change-level defec t prediction method that uses the semantic characteristics of change information and chang e metrics to improve the ability of existing methods to change the level of prediction meth ods.The main work and innovation of this article are as follows:(1)Code line-level defect prediction.This paper proposes a code-level defect predicti on model based on the usage specifications of class APIs.This paper first proposes a meth od for extracting class API sequence based on abstract syntax tree.It extracts the API-calli ng sequence of the instance of the specified class from the source code file,and builds a la nguage model based on the API-calling sequence to predict the API misuse defect in the A PI sequence,locate the code defect to the line of code using the API;(2)Change level defect prediction.This paper proposes a prediction model based on c hange semantics and change metrics.In order to make full use of the original text information in the code change,the model improves the change-level defect model by extracting th e commit log and code changes in the change information,using the RCNN model to learn the change semantic features,and combining the semantic features with traditional change metrics,which improves the predictive power of change-level defect model.In this paper,two proposed fine-grained defect prediction methods are experimentally verified and compared with existing research.The results show that: in change-level predi ction,the use of changed semantic features can effectively improve the performance of the prediction model;in code-line-level prediction,Learning API usage specifications can eff ectively predict API misuse in code.
Keywords/Search Tags:defect prediction, fine-grained, API usage specification, semantic features, code line level, change level
PDF Full Text Request
Related items