Font Size: a A A

Defect Prediction And Localization Based On Deep Learning And Meta-heuristic Algorithms

Posted on:2021-05-08Degree:MasterType:Thesis
Country:ChinaCandidate:S M GuoFull Text:PDF
GTID:2428330605481142Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In recent years,along with the continuous expansion of software scale,software security problems are becoming more and more prominent,which leads to higher software maintenance costs.In software maintainence,both defect report severity prediction and defect localization are important tasks.However,manually classifying the severity of defect reports and locating buggy files is very time consuming and tedious.Therefore,how to automate the severity prediction of defect reports and the localization of buggy files corresponding to defects is a very challenging and meaningful task,which can effectively help developers repair defects and improve the efficiency of software maintenance,thus effectively guaranteeing software security and quality.Recently,researchers have proposed many advanced methods to automate defect report severity prediction and defect localization.However,there is still room for improvement in performance.Under this motivation,by mining software defect report features and the semantic similarity between the defect reports and source files,we propose two methods for automatically identifying the severity of software defect reports and localizing the buggy files,respectively.The main contributions of this paper are as follows:(1)In view of the problem of the severity prediction of defect reports,we propose a method based on genetic algorithms and convolutional neural networks(GACNN).We first preprocess defect reports and select textual features by genetic algorithms(GA).Then,the Word2 Vec model is employed to generate word vectors for the selected features in each defect report.Finally,we train the classifier based on convolutional neural networks(CNN)and leverage the trained classifier to predict the severity of defect reports.The experimental results show that our method achieves 77.38% in terms of precision,62.09% in terms of recall and 68.76% in terms of F1-score on average,and outperforms the best baseline method by 11.61%,7.23% and 9.32%,respectively.(2)In view of the problem of defect localization,we propose a new method based on sentence embedding and particle swarm optimization algorithm(SPSO).The SPSO method first preprocesses the defect reports and source code files,and separates combined words according to the Camel Case method.Secondly,the SIF is used to calculate the semantic similarities between the defect reports and source code files,and the surface lexical similarities between them is calculated based on TF-IDF.Then,we calculate other scores including the repair time and frequencies of source code files,and a collaborative filtering score.Finally,the particle swarm optimization(PSO)algorithm is adopted to optimize the weight value of each score to obtain a comprehensive score.The experimental results validate the effectiveness of the SPSO method,with an average MAP value of 0.43 and an MRR value of 0.50.
Keywords/Search Tags:severity prediction, convolutional neural network, genetic algorithms, defect localization, particle swarm optimization algorithm
PDF Full Text Request
Related items