Font Size: a A A

The Design And Implementation Of Human--machine Interactive Patch Review System For Automatic Program Repair

Posted on:2022-08-28Degree:MasterType:Thesis
Country:ChinaCandidate:S C XuFull Text:PDF
GTID:2518306725484744Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
The increasing scale and complexity of software,as well as the endless emergence of errors and defects in program code have brought new challenges to software testing and program debugging.Automatic program repair has become one of the effective means to solve the cost of testing and debugging.However,the current automatic pro-gram repair technology still has problems such as low accuracy.Incorrect patches can easily become interference factors,which not only increase the cost of testing and de-bugging,but also even lead to errors or defects unresolved.In order to improve the accuracy of patches generated by automatic repair tools,this thesis proposes a Human-machine Interactive Patch Review Method for Automatic Program Repair.This method involves two types of participants,the developer and the machine.For the candidate patches proposed by automatic program repair tools,the machine's responsibility is to analyze the code and extract the dynamic and static char-acteristics of the code through building an abstract syntax tree for the code,then use the automatic testing tool to expand the test cases for the patch and the program.The developer's responsibility is to recognize and understand the program through inter-active information,design test oracle combined with code features,and improve test cases generated by machine.With the help of the design of this thesis,our purpose is to build test cases with high sufficiency under the interaction between the developer and the machine,so as to review the candidate patches,filter out the incorrect patches,and complete the repair of defective projects.Based on the analysis of the current problems in the field of program repair,as well as the discussion and design of Human-machine Interactive Patch Review Method,this method is implemented as an automatic plug-in and integrated into the local IDE.The overall design of the system is divided into data analysis module,test management module and human-machine interaction module.The data analysis module is used to analyze the original data and construct the information needed in the process of human-machine interaction.The test management module supports the test and data expansion of the defective program.The human-machine interaction module is responsible for the interaction between the developer and the machine.Multiple modules cooperate with each other to complete the implementation of the system.Finally,this thesis checks the Human-machine Interactive Patch Review System For Automatic Program Repair from the aspects of system test and experiment.Through the system test,it is verified that the system function test and non-function test are in line with the expectation.Through the experiment on the general defect dataset Defects4 J,the data results show that the Human-machine Interactive Patch Review Method can fil-ter out 82.61% of the incorrect patches,and improve the accuracy of patches by 25%.In the user research,we also got the positive evaluation from the participants.Human-machine Interactive Patch Review Method can effectively improve the efficiency of program testing and debugging,and has a certain practicality.
Keywords/Search Tags:Program repair, Code analysis, Test generation, Test oracle, Human-machine interaction
PDF Full Text Request
Related items