Font Size: a A A

Automatic Repair Of Program Bugs Based On Template Mining

Posted on:2022-02-16Degree:MasterType:Thesis
Country:ChinaCandidate:J X HanFull Text:PDF
GTID:2518306602956009Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the increasing demand for software,software programs become more and more complex,and the probability of program bugs also increases.How to repair program bugs and ensure program quality is a key issue in the field of software engineering,and it is also a tedious task that requires a lot of manpower and time.For this reason,researchers try to use the program's own code and test case information to study the automatic repair of program bugs.The template-based automatic repair of program bugs is an effective method,which mainly includes two stages:template mining and program repair.However,due to noise interference in the program history restoration information,it is difficult for the existing template mining methods to obtain an accurate restoration template;and most of the template-based program repairs adopt enumeration strategies without considering the semantic information of the program,so the program repair effect is not good,and there are many repair patches.This paper proposes an improved template-based automatic repair method for program bugs to improve the automatic repair effect and efficiency of the program.Specifically,in the program repair template mining,use regular expression rules to delete useless information in the repair information to improve the accuracy of the repair template;In the template-based automatic repair of program bugs,a repair strategy based on program semantics is proposed.The repair template is selected according to the semantic correlation between the template and the program to be repaired,and the most recent relevant strategy is used to search the appropriate repair elements from the damaged program,and the repair patch is generated.Furthermore,the semantics of repair patches based on test suite verification may be different from the semantics of the original program.This topic combines the suspicion value of the bug,the degree of code modification,and the type of template used to give a semantic-based patch sorting strategy.Preferentially select patches with similar semantics to the original program to repair the program.In order to verify the effectiveness of the method in this paper,experiments were conducted on 4 open source projects.The experimental results showed that 27 defects were successfully repaired in 224 broken programs,and the average repair time for each defect was 3.2 minutes.Compared with the existing program repair tools,the repair efficiency has been increased by about 36%.It can be seen that the method in this paper can repair more program defects in a shorter time,and the effect and efficiency of automatic repair of program bugs are greatly improved.
Keywords/Search Tags:program bug, template mining, automatic repair, semantics, patch
PDF Full Text Request
Related items