Abstract

Automated program repair aims at finding the correct patch of a bug using a specification such as test cases. An existing study found that almost 82.40% repair actions are associated with expressions such as method invocation or assignment expression. However, handling expression level bugs enhances the search space and increases the probability of finding incorrect plausible patches before the correct one. Consequently, existing program repair approaches either avoid or limitedly focus on expression level bugs. This study proposes two automated program repair approaches that extensively deals with expression level bugs. The devised techniques combine syntactic and semantic similarities to handle the enlarged search space and rank the correct patch higher. Genealogical and variable similarity are used to measure semantic similarity since these are good at differentiating between correct and incorrect patches. Two popular metrics namely normalized longest common subsequence and token similarity are considered individually for capturing syntactic similarity. To evaluate the proposed techniques, these are compared with baseline approaches that use either semantic or syntactic similarity. Single line bugs from Defects4J and QuixBugs benchmark are used for comparison. Result reveals that the proposed techniques can correctly repair 22 and 21 expression level bugs which are higher than approaches using only semantic or syntactic similarity. Furthermore, the devised approaches obtain 64.71% and 61.76% precision and outperform the baseline program repair techniques.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.