Font Size: a A A

Frequent Repair Pattern Acquisition And Mutation Operator Discovery Based On Graph Mining

Posted on:2022-07-20Degree:MasterType:Thesis
Country:ChinaCandidate:J TianFull Text:PDF
GTID:2518306572460014Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Nowadays,software products have a very wide range of applications.The occurrence of software errors may bring serious consequences,and the positioning of software faults is even more important.Manually locating faults is time-consuming and laborious,and automated error locating can save developers time and reduce the difficulty of debugging.Mutation-based fault localization does not involve program dependency analysis.It is a lightweight fault localization method with low computational complexity,and at the same time,it is localized at the sentence level with high positioning accuracy.However,because a large number of mutants will be generated and executed,the cost is high.Since the existing mutation operator is designed to simulate program bugs,if the mutation operator can accurately simulate the repairs that exist in the real program,then it is possible to produce real program repairs,which will not only help improve the accuracy of fault localization,but also can reduce the cost of mutation.However,currently,there are few researches on mutation operator mining.Usually,some simple mutation operators with minor changes are selected to generate mutants,which may not be able to simulate the repair mode in the real program,so the frequent patterns in the real program are explored to simulate the repair of the program may make the mutation operator more suitable for fault localization,thus mentioning the fault localization accuracy.In response to the above problems,this paper studies a new mutation operator discovery method based on frequent repair pattern mining.The specific work is as follows:First,Obtain program bug and repair file pairs from Defects4 J,a benchmark data set in the field of software testing,positioning,and repair,and then use the abstract syntax tree comparison method Gumtree to get the change from the bug to the repair file,which is expressed as the editing script,and then each edit of the editing script is converted into a node of the graph,the connection between the edits is converted into an edge of the graph,and the modified graph is obtained,and then the modified graph is mined to obtain frequently repaired subgraphs,and the subgraphs are combined with their contextual information for manual analysis,and frequent repair modes are obtained which represents the law of program repair.After obtaining the frequent repair modes,according to their meaning and usage scenario,summarize the frequent repair modes into new mutation operators,explain the meaning and application scenario of each mutation operator,and then apply the new mutation by changing it on the abstract syntax tree.After the operator is mutated,and the modified abstract syntax tree is restored to the form of the source code to obtain the mutant.In this paper,three new mutation operators are obtained,namely null check insert(NCS),number comparison insert(MCS)and if statement deletion(ISD).Finally,the use of the new mutation operator is integrated into the fault localization process.In order to enable the new mutation operator to be combined with different fault localization methods,the new mutation operator and the original mutation operator are subjected to mutation and testing separately,and the results are combined during the suspicion calculation process.Then,the validity of the new mutation operators is verified on a project different from the mining projects in Defects4 J.Compared with using only the traditional mutation operators,the accuracy of fault localization is improved after the new mutation operators are added.
Keywords/Search Tags:mutation test, fault localization, frequent repair pattern mining, graph mining, mutation operator discovery
PDF Full Text Request
Related items