Abstract
Recently, code similarity has been used in several automated program repair (APR) tools. It suggests that similarity has a great contribution to APR. However, code similarity is not fully utilized in some APR tools. For example, SimFix only uses structure similarity (Deckard) and name (variable and method) similarity to rank candidate code blocks that are used to extract patches and do not use similarity in patch filtering. In this paper, we combine the tool with longest common sequence (LCS) and term frequency-inverse document frequency (TFIDF) to rank candidate code blocks and filter incorrect patches. Then we design and set up a series of experiments based on the approach and collect the rank of the correct patch and time cost for each selected buggy program. In the candidate ranking phase, LCS and TFIDF improve the rank of the block, which contains the correct patch for several bugs. In the patch validation phase, LCS filters out 68% of incorrect patches on average. It shows that code similarity can greatly improve the performance of APR tools.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
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.