Font Size: a A A

Software Defect Prediction Using Program Slicing

Posted on:2015-06-06Degree:MasterType:Thesis
Country:ChinaCandidate:J WangFull Text:PDF
GTID:2298330452964157Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Every defect in software must be handled properly, and the number of softwaredefects directly refects the quality of the software. In defects discovery and removalprocesses, defect prediction based on software repository plays a critical role. First, itcan guide software developers to put limited resources into defect-prone modules, andimprove software quality. And in the assessment of critical software, it play a decisiverole in deciding whether the software can be released or not. Although using data min-ing and machine learning methods researchers have obtained satisfactory predictionaccuracy, applying machine learning model directly to defect prediction may cause alot of problems against the experience of software bugs.First of all, this paper proposed a defect prediction method, by using this methodthispapercomparedthreeexistingsoftwarepredictionalgorithmsnamelyCART,NaiveBayesandC4.5. AndthenthispaperproposedanimproveddefectpredictionalgorithmbasedonC4.5model. TheimprovedalgorithmintroducedSpearman’srankcorrelationcoefcient to make the choosing of attribute as the root node of the decision tree muchmore in line with the actual situation. Besides, based on the improved algorithm, thispaper proposed a new prediction granularity named slice, which can be generated fromclusteringfunctionsinaprogramcallgraphbasedontheirdistancesbetweeneachotherin this graph.In order to verify the efectiveness of the improved algorithm and new granular-ity, this paper designed a prediction model which is composed of prediction metricsand prediction algorithm. There are mainly three steps in the process of prediction inthis model:1) metrics computing, which retrieves metrics from software repository,includingsourcecodemetrics, changemetrics, defectmetricsandslicemetrics;2)pre-diction, whichusesthemetricsasinputofpredictionalgorithmsandoutputspredictionon the defects;3) algorithm improvement, which makes the prediction better based on the characteristics of the mined metrics.Finally, this paper compared existing algorithms and improved algorithms usingthe prediction model. The experiment showed that the improved models signifcantlyreduced the size of the decision tree and increased the prediction accuracy of these twomodulesby4.5802and4.8656percentagesrespectively. Theexperimentoncomparingslice granularity and fle granularity without zero-defect functions showed that both ontraining set and testing set, prediction from slice granularity was more accurate thanthat from fle granularity, reaching8.5and2.5percentages respectively. Besides, thedecision tree size of slice granularity was50%smaller than that of fle granularity.
Keywords/Search Tags:Software Repository, Data Mining, Defect Predic-tion, Slice Granularity
PDF Full Text Request
Related items