CRSearcher: Searching Code Database for Repairing Bugs.

Yingyi Wang,Yuting Chen,Beijun Shen,Hao Zhong
DOI: https://doi.org/10.1145/3131704.3131720
2017-01-01
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.
What problem does this paper attempt to address?