Font Size: a A A

Fault Localization Based On Neural Network And Program Slicing

Posted on:2022-04-07Degree:MasterType:Thesis
Country:ChinaCandidate:R X S L D KuFull Text:PDF
GTID:2518306533479694Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the increase of software scale and complexity,software errors are difficult to avoid,and software debugging becomes more and more difficult.Software fault localization is the most expensive and time-consuming step in software debugging.Traditional manual fault localization is both tedious and difficult,so researchers have proposed automated fault localization technology to help manual debugging.Compared with manual fault localization,automatic fault localization technology can guide programmers to find the location of the fault more quickly and accurately.This will be benefit to reduce maintenance costs in the software development process.Therefore,further research on how to improve the accuracy of automated fault localization methods is of great significance for improving software testing efficiency and reducing debugging costs.Experts and scholars of domestic and abroad have conducted much research on this subject and proposed many automatic software fault localization methods,but there are still some shortcomings.The main manifestation are as follows:(1)The existing fault localization methods based on learning ranking lack the ability to automatically select important features and discover new features from the existing information,and cannot fully exploit the existing program feature information.Besides,the generalization ability for complex problems is limited,and the limited data set cannot be used to exactly express the shortcomings of complex functions;(2)The existing fault localization methods do not make full use of the information contained in the execution slice to assist the fault localization work.In response to the above problems,the main works of this paper are as follows:(1)We proposed a novel fault localization method based on spectrum and MLP neural network.The method first calculated the suspicion values of the program entity based on 33 SBFL suspicion formulas and the execution result information of the program entity in the test case;Then the suspicion values were used as the program spectrum features,and the execution result was input into the MLP network for training as a label.As a result,a model for evaluating the suspicion of program entities would be constructed;Finally,spectral features and label information of the program under test were also extracted and input into the model to obtain the suspicion value of each entity of the program.The entities are sorted in descending order according to the suspicion values,and the positioning errors were checked one by one.The experimental results of the six subroutines of Defects4 j showed that the fault localization method MFL proposed in this chapter is effective,and the error accuracy is higher than the four existing methods.(2)We proposed a novel fault localization method based on execution slicing.This method first used the method in Chapter 3 to obtain the suspicion value of the program entity,and then took the intersection of all failed execution slices,and finally sorted the entities in the intersection according to the entity suspicion value obtained previously,so that the statements unrelated to the program execution failure are deleted,thereby narrowing the scope of fault detection and reducing the cost of fault localization.The experimental results showed that the method S-MFL proposed in this chapter effectively reduces the number of sentences to be detected by the MFL method,which is better than the existing fault localization.(3)We designed and implemented an automated fault localization tool.The tool could automatically collect program coverage matrix information,program spectrum characteristics,and automatically calculate entity suspicion values.It also provides a visual tool interface for easy operation and can help debuggers locate faults more quickly.
Keywords/Search Tags:fault localization, multi-layer perceptron neural network, spectrum-based fault localization, execution slicing, statement suspiciousness
PDF Full Text Request
Related items