Font Size: a A A

Research On Optimizing Spectrum-based Fault Localization

Posted on:2024-05-03Degree:MasterType:Thesis
Country:ChinaCandidate:H Y ZengFull Text:PDF
GTID:2568307103975079Subject:Computer technology
Abstract/Summary:PDF Full Text Request
The rapid development of society and changing needs have placed higher demands on software systems,so improving software reliability has become critical.At present,in the field of software engineering automation,there have been some relatively mature software defect diagnosis techniques,of which spectrum-based defect localization(Spectrum-Based Fault Localization,SBFL)is one of the research hotspots.The existing algorithm,however,still has room for improvement in dealing with the problems of coincidental correctness test cases in the test suite,error propagation in the program,low quality of test cases,and ties of suspicion in the suspicion list.(1)To address the problem that coincidental correctness test cases affect the accuracy of fault localization,this thesis proposes a method called dealing with coincidental correctness test cases on fault localization.First,in order to narrow down the fault statement search,the fault base is defined as the intersection of the failed test case coverage vectors based on the fact that the failed test case must execute the fault statement.And in order to identify coincidental correctness test cases with zero error,the successful test cases that execute all statements in the fault base are determined to be coincidental correctness test cases.Finally,two strategies Tec-Ⅰ and Tec-Ⅱ are proposed,which use different methods to handle sets of statements with different fault probabilities.Aim to optimize the coverage of the program spectrum and assist subsequent fault localization.It is experimentally demonstrated that the proposed method has better fault localization effect compared with the existing methods.(2)In SBFL,every test case is equally important,program entities are treated in isolation,and internal constructs and interactions are ignored.To address the above issues,this thesis proposes a method called weighting test cases based on Trust Rank.First,to descript coverage features and fault propagation,the program spectrum is modeled as a complex network model with statements and test cases as nodes.where the edges between nodes describe the node correlation and the weights of the nodes describe the fault probability distribution.Second,the node importance is calculated from the number and quality of connected nodes using the Trust Rank algorithm conforming to the SBFL heuristic.Finally,to distinguish test case importance differences,new weights are assigned to test cases based on the importance of nodes in the network and introduced into the SBFL calculation formula.It is experimentally demonstrated that the TOP-N,MAP and MWE metrics of the proposed method are significantly improved compared with those in 12 classical fault localization calculation.(3)To address the problem of suspicion tied in the suspicion ranking list due to inconspicuous differences in program coverage,this thesis proposes a method called the reduction of parallel suspicious on fault localization.First,the variable location information in the program is extracted,and the initial suspicion of the variables and statements are calculated separately according to SBFL.Second,to measure the influence of the variables on the statements,the similarity coefficient was used to calculate the fault correlation between the variables and the statements,and to calculate the contribution of the variables to the suspicion of the statements.Finally,in order to distinguish the statement suspicion more effectively,the initial suspicious of the statement is adjusted using the suspicious contribution rate to obtain the final suspicious ranking list.It is experimentally demonstrated that the proposed method can effectively solve the ties within suspicious ranking list and improve the fault localization performance.
Keywords/Search Tags:software fault localization, coincidental correctness, fault propagation, the weights of test cases, suspicion ties
PDF Full Text Request
Related items