Font Size: a A A

Software Defect Pattern Analysis And Location Based On Cppcheck

Posted on:2015-08-02Degree:MasterType:Thesis
Country:ChinaCandidate:S J ZhangFull Text:PDF
GTID:2298330422971776Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the continuous expansion of science technology and software developmentscale,software has been widely used in all walks of life,which has becoming anindivisible part of our life.Although the software will be tested rigorously beforereleased,the average per thousand of code still have software defects between10to20.Therefore it will be main directions of research about how to improve softwarequality and exclude more software defects.Based on defect pattern of static softwaredefect detection technology is developing rapidly in recently years which is one of staticsource code analysis technology.Its main ideas as follow:Firstly,extracting the defectpattern by programs;Secondly,using regular expressions to describe software defectswhich have been extracted defect pattern;At last,using pattern matching algorithm tomatch the software defect and locate the software defect.This kind of defects detectionmethod has been widely used in software testing because of high efficiency andsimple.Work of this paper includeing the following contents:(1) Based on software pattern for a static open source software defect ofCppcheck,we focus on research and classification of software defects pattern for C/C++language. The software defection tool of Cppcheck existed insufficient for opensoftware defect,mainly analyse the Cppcheck architecture、defect pattern representationand implemention,and on the basis of summarizing350defect patterns to improveCppcheck.(2) As to problems for the Cppcheck of open source software whose FalseNegative Rate and False Positive Rate are too high,and can not be detected defects inrunning program. Interval set algorithm is put forward on the basis of Cppcheckprogram and be used for detecting on array bound overflow. Establishing shapinginterval set and array interval set by introduced concept of interval set.Each programvariables and expressions interval values are constructed under the framework ofCppcheck to detect contradictions to locate defects.Finally,in comparsion experimentswith the original open software of Cppcheck and improvement of open software ofCppcheck to verify the effectiveness of improved Cppcheck.On the basis of analysis and research for the Cppcheck program,we use theclassification of defect pattern for C/C++languages to improve its detection rates withinthe framework of the open source software of Cppcheck. As to problems for the Cppcheck of open source software whose False Negative Rate and False Positive Rateare too high,interval set algorithm is put forward to improve its capability of dynamicdetection.According to3.6experiments results show that the Precise Rate of theimproved Cppcheck gets to83%,as well as,the False Negative Rate of the improvedCppcheck gets to between10%-17%.Therefore,defects detection capabilitiessignificantly improved,while Fasle Negative Rate is not high. According to4.7experiments results show that the Precise Rate of the improved Cppcheck increasing to18.5%relative to the Precise Rate of the Cppcheck,the False Positive Rate of theimproved Cppcheck decreasing to18.5%relative to the False Positive Rate of theCppcheck. Therefore,defects detection capabilities significantly improved.Finally,thedefects detection has greatly improved,as the same time,reducing the False PositiveRate,all of this has achieved good results.
Keywords/Search Tags:defect pattern, Cppcheck, abstract interval set, array bound overflow
PDF Full Text Request
Related items