| Automatic software fault localization can assist testers to efficiently find potential program faults,which is significant for reducing the software testing cost and improving the quality of software products.Although spectrum-based fault localization SBFL,as one of the most research hotspots in this filed,has made breakthroughs in the fault suspicion calculation method,it pays little attention to the role of program spectrum and test cases in fault localization.And the problems related to the single-feature program spectrum and test case contribution measurement are the important reasons for the low and instability efficiency of SBFL.For the above problems,this thesis proposes a two-dimensional program spectrum fault localization framework 2DSFLF.The 2DSFLF not only designs a multi-feature two-dimensional program spectrum 2DSS,but also uses the information quantity to measure the contribution of test cases and creates a three-layer neural network model combining RBF kernel function and ridge regression.Firstly the features of program statements such as static data dependencies and dynamic test case coverage information are extracted by ANTLR and GCC.Next,the static and dynamic characteristics of program are used to construct the onedimensional statement spectrum with statement state and data flow spectrum with data dependence.After characterizing the data flow spectrum by Z-Score,2DSFLF combines the statement state of the statement spectrum and the Z-Score feature characterized by the data flow spectrum into a 2DSS.Subsequently,a program fault locator can be generated by training the three-layer RBF neural network with 2DSS.In the model training process,the weights from the second layer to the output layer are estimated by the method of ridge regression with local weighting of information quantity,which can measure test case contribution and avoid model overfitting.Lastly,this locator can generate the corresponding statement suspiciousness when the virtual spectrum is input to the locator,and then realize the labeling of faulty statements with high suspiciousness.Experiments on Siemens Suit show that 2DSFLF improves the efficiency and precision of software fault localization compared with existing techniques like BPNN,PPDG,Tarantula and so forth.In addition,this thesis designs an automatic software fault localization tool that can simplify the tedious data processing and visualize the fault evaluation results based on 2DSFLF. |