Font Size: a A A

The Mutual Enhancement Of Static Defect Detection And Defect Prediction

Posted on:2020-03-19Degree:MasterType:Thesis
Country:ChinaCandidate:X ZhangFull Text:PDF
GTID:2518305732973769Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the increasing complexity of software systems,software quality has received increasing attention.Software defects coming from software design and coding errors make software products unable to meet user needs or unexpected results and behaviors.Serious software defects lead to huge economic losses and even life-threatening.It is very difficult to find defects in the software.Software developers and quality assurance personnels take a series of measures to detect software defects as early as possible to ensure the quality of software products.Static detection techniques and defect prediction techniques help developers discover software defects.Static detection techniques use static detection tools to discover potential exceptions in the code without executing code,and the developers review the warnings to make the necessary corrections to the code.Defect prediction technology discovers the relationship between code features and software defects by fully exploiting the historical data of the software lifetime,constructs prediction models,and recommends to developers the software modules which may contain defects.Static detection technology and defect prediction technology help software practice participants to understand the distribution of software defects,rationally allocate limited human and material resources,and improve the efficiency of software testing and maintenance.Previously,most researchers generally focused on one of static detection technology and defect prediction technology with little intersection.Although the results of the static analysis are warning messages and the results of the defect prediction are sequence of modules sorted according to the predicted result,both have a common goal-to find defects in the software.Then,whether the static detection technology and the defect prediction technology can enhance each other,that is,whether the warnings generated by the static detection can improve the performance of the defect prediction,and whether the results of the defect prediction can improve the ordering of the static detection warning remain to be answered.In this way,this paper has carried out a series of research and experiments.The main work and conclusions are as follows:(1)This paper conducts empirical research on the ability of static detection tools to detect defects,analyzes the recall and precision of two static detection tools FindBugs and PMD,and compares static analysis techniques with defect prediction techniques.The results show that the static detection tools can detect a considerable number of software defects,but the precision of detecting defects is relatively low.Compared with the defect prediction technology,the static detection tools do not detect more defects than defect prediction with the code review increasing.(2)This paper proposes a method to improve the performance of defect prediction using the warning information generated by static detection.Considering the warning categories and number of each category as additional module metrics,then build the defect prediction models based on the warnings from static detection.The results show that the static detection tool improves the performance of defect prediction.The metrics from PMD is more effective than the FindBugs in the defect prediction and combination of the two static detection tools produce much better prediction results.This means that the warning information generated by static detection tool is useful to existing defect predictions.(3)This paper proposes a method for optimizing static detection warnings using defect prediction results.The prediction result generated by the defect prediction is used as a sorting basis for the static detection warning,and the ranking based on the defect prediction result is corrected by using the module coreness value based on k-core decomposition on program model dependence graph.The results show that the ranking strategy based on defect prediction results can optimize the ranking of static detection tool warnings.In general,although there are many differences between static detection and defect prediction,both can enhance each other.
Keywords/Search Tags:software defect, static detection, defect prediction, ranking, enhancement
PDF Full Text Request
Related items