Abstract

With the exponentially rising of software development in the past decades, millions of software products have been created. Existing empirical studies show that many code snippets are similar. Although there exist many difficulties in maintaining these similar code snippets, we believe that it is feasible to leverage the similarity to enhance program repairs, as bugs may have already been repaired in many other similar code snippets.In this paper, we propose CRSearcher, an approach, that searches open-sourced codebases and uses similar code to repair bugs. It is designed with insights from three observations: small patch, code redundancy, and the availability of open-sourced software repositories. With these insights, CRSearcher provides the engineers with an interactive strategy for program repair which automatically locates bug location, searches for similar code, and recommends code snippets as an aid, but allows developers to make a final decision.We have implemented CRSearcher on the basis of the state-of-the-art techniques such as Findbugs and a token-based similar code snippets search engine. In our evaluation, we have built a code database that consists of several open-source projects. Our evaluation results show that CRSearcher does help generating high quality program patches, and reduce more than 50% time on repairing six buggy programs.

Full Text
Paper version not known

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.