Font Size: a A A

The Study Of Software Defect Prediction Based On Code Semantic Metrics

Posted on:2022-06-18Degree:MasterType:Thesis
Country:ChinaCandidate:T HuFull Text:PDF
GTID:2518306350967089Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the progress of society and the rapid development of the computer industry,software systems have been widely used in various fields of society,and have greatly enriched and improved modern life.Software is essentially a competitive and ever-changing business.With the rapid changes in the market,hardware and software platforms,customers' requirements for software quality are gradually increasing.At the same time,due to the complexity of the software system,the shortcomings are Inevitable,so software testing becomes crucial.In order to improve the efficiency of software testing,software defect prediction technology came into being.This technology can identify the files that are prone to defects in the software and help guide the allocation of resources to the files that are most likely to have defects.Defect prediction is an important and active research field.Accurate prediction can help developers to effectively identify defect-prone files in the early stage,and determine the priority of their repair and testing,thereby improving the efficiency and productivity of the development team,and at the same time,it can further improve the quality of the software and increase customer satisfaction degree.In the past few decades,researchers have proposed many methods for defect prediction by using code syntax metrics.However,most of the existing methods are based on grammatical metrics,and there are few semantic metrics based on source code to construct defect prediction models.Although programs can be described by syntax metrics and can be represented by abstract syntax trees(AST),traditional code syntax metrics usually cannot capture the semantic differences between different programs.Because program files with different semantics can have the same grammatical metrics,the existing traditional grammatical metrics cannot distinguish codes with different semantics.Therefore,a set of semantic metrics is needed to capture semantic differences between different programs and improve defect prediction.Accuracy.This paper proposes a new model,the Semantic Dependency Graph(SDG),which represents the semantic relationship between source files.On this basis,a new concept that is coupled space is proposed.According to the semantic dependency graph,a set of semantic metrics is formally defined.This set of indicators reflects the semantic characteristics of project source files from different angles and dimensions.In addition,this article created a tool to automatically generate the SDG-based semantic metrics proposed in this article.And the semantic metrics are combined with three machine learning algorithms,Naive Bayes,Alternating Decision Tree,and Logistic Regression,to construct a defect prediction model.In order to evaluate the performance of the defect prediction model,this paper studies 5 items in the PROMISE data set,and uses the F-measure indicator to evaluate 10 prediction models.Through the experimental research in this article,it is proved that the semantic indicators based on SDG are effective for constructing defect prediction models,and the metrics based on SDG are better than traditional grammatical metrics in defect prediction.In addition,compared with the two latest models that automatically learn semantic features,the model using SDG-based metrics can achieve better prediction performance.Finally,the applicability of the method in this article in practice in terms of execution time and space is also introduced.
Keywords/Search Tags:Software Quality, Defect Prediction, Machine Learning, Semantic Dependence, Semantic Code Metric
PDF Full Text Request
Related items