Title
Context-aware patch generation for better automated program repair.
Abstract
The effectiveness of search-based automated program repair is limited in the number of correct patches that can be successfully generated. There are two causes of such limitation. First, the search space does not contain the correct patch. Second, the search space is huge and therefore the correct patch cannot be generated (i.e., correct patches are either generated after incorrect plausible ones or not generated within the time budget). To increase the likelihood of including the correct patches in the search space, we propose to work at a fine granularity in terms of AST nodes. This, however, will further enlarge the search space, increasing the challenge to find the correct patches. We address the challenge by devising a strategy to prioritize the candidate patches based on their likelihood of being correct. Specifically, we study the use of AST nodes' context information to estimate the likelihood. In this paper, we propose CapGen, a context-aware patch generation technique. The novelty which allows CapGen to produce more correct patches lies in three aspects: (1) The fine-granularity design enables it to find more correct fixing ingredients; (2) The context-aware prioritization of mutation operators enables it to constrain the search space; (3) Three context-aware models enable it to rank correct patches at high positions before incorrect plausible ones. We evaluate CapGen on Defects4J and compare it with the state-of-the-art program repair techniques. Our evaluation shows that CapGen outperforms and complements existing techniques. CapGen achieves a high precision of 84.00% and can prioritize the correct patches before 98.78% of the incorrect plausible ones.
Year
DOI
Venue
2018
10.1145/3180155.3180233
ICSE
Keywords
Field
DocType
Context-Aware, Automated Program Repair, Patch Prioritization
Computer science,Software bug,Prioritization,Real-time computing,Context model,Software,Artificial intelligence,Granularity,Novelty,Benchmark (computing),Machine learning,Maintenance engineering
Conference
ISBN
Citations 
PageRank 
978-1-4503-5638-1
36
0.67
References 
Authors
44
5
Name
Order
Citations
PageRank
Ming Wen113711.70
Junjie Chen21505.55
Rongxin Wu352819.69
Dan Hao486341.59
S. C. Cheung52657162.89