Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3131704.3131720acmotherconferencesArticle/Chapter ViewAbstractPublication PagesinternetwareConference Proceedingsconference-collections
short-paper

CRSearcher: Searching Code Database for Repairing Bugs

Published: 23 September 2017 Publication History

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.

References

[1]
Rui Abreu, Peter Zoeteweij, and Arjan JC Van Gemund. 2007. On the accuracy of spectrum-based fault localization. In Testing: Academic and Industrial Conference Practice and Research Techniques-MUTATION, 2007. TAICPART-MUTATION 2007. IEEE, 89--98.
[2]
Brenda S Baker. 1995. On finding duplication and near-duplication in large software systems. In Reverse Engineering, 1995., Proceedings of 2nd Working Conference on. IEEE, 86--95.
[3]
Ira D Baxter, Andrew Yahin, Leonardo Moura, Marcelo Sant'Anna, and Lorraine Bier. 1998. Clone detection using abstract syntax trees. In Software Maintenance, 1998. Proceedings., International Conference on. IEEE, 368--377.
[4]
Tom Britton, Lisa Jeng, Graham Carver, Paul Cheak, and Tomer Katzenellenbogen. 2013. Reversible debugging software. University of Cambridge-Judge Business School, Tech. Rep (2013).
[5]
Andy Chou, Junfeng Yang, Benjamin Chelf, Seth Hallem, and Dawson Engler. 2001. An empirical study of operating systems errors. In ACM SIGOPS Operating Systems Review, Vol. 35. ACM, 73--88.
[6]
Stéphane Ducasse, Matthias Rieger, and Serge Demeyer. 1999. A language independent approach for detecting duplicated code. In Software Maintenance, 1999.(ICSM'99) Proceedings. IEEE International Conference on. IEEE, 109--118.
[7]
Mark Gabel and Zhendong Su. 2010. A study of the uniqueness of source code. In Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering. ACM, 147--156.
[8]
Gaston H Gonnet and Ricardo A Baeza-Yates. 1990. An analysis of the Karp-Rabin string matching algorithm. Inform. Process. Lett. 34, 5 (1990), 271--274.
[9]
Abram Hindle, Earl T Barr, Zhendong Su, Mark Gabel, and Premkumar Devanbu. 2012. On the naturalness of software. In Software Engineering (ICSE), 2012 34th International Conference on. IEEE, 837--847.
[10]
Dennis Jeffrey, Min Feng, Neelam Gupta, and Rajiv Gupta. 2009. BugFix: A learning-based tool to assist developers in fixing bugs. In Program Comprehension, 2009. ICPC'09. IEEE 17th International Conference on. IEEE, 70--79.
[11]
Guoliang Jin, Linhai Song, Wei Zhang, Shan Lu, and Ben Liblit. 2011. Automated atomicity-violation fixing. In ACM SIGPLAN Notices, Vol. 46. ACM, 389--400.
[12]
J Howard Johnson. 1993. Identifying redundancy in source code using finger-prints. In Proceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: software engineering-Volume 1. IBM Press, 171--183.
[13]
Toshihiro Kamiya, Shinji Kusumoto, and Katsuro Inoue. 2002. CCFinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering 28, 7 (2002), 654--670.
[14]
Raghavan Komondoor and Susan Horwitz. 2001. Using slicing to identify duplication in source code. Static Analysis (2001), 40--56.
[15]
Rainer Koschke, Raimar Falke, and Pierre Frenzel. 2006. Clone detection using abstract syntax suffix trees. In Reverse Engineering, 2006. WCRE'06. 13th Working Conference on. IEEE, 253--262.
[16]
Claire Le Goues, Michael Dewey-Vogt, Stephanie Forrest, and Westley Weimer. 2012. A systematic study of automated program repair: Fixing 55 out of 105 bugs for $8 each. In Software Engineering (ICSE), 2012 34th International Conference on. IEEE, 3--13.
[17]
Zhenmin Li, Shan Lu, Suvda Myagmar, and Yuanyuan Zhou. 2006. CP-Miner: Finding copy-paste and related bugs in large-scale software code. IEEE Transactions on software Engineering 32, 3 (2006), 176--192.
[18]
Fan Long and Martin Rinard. 2016. An analysis of the search spaces for generate and validate patch generation systems. In Proceedings of the 38th International Conference on Software Engineering. ACM, 702--713.
[19]
Krishna Narasimhan and Christoph Reichenbach. 2015. Copy and paste redeemed (T). In Automated Software Engineering (ASE), 2015 30th IEEE/ACM International Conference on. IEEE, 630--640.
[20]
Lutz Prechelt, Guido Malpohl, and Michael Philippsen. 2002. Finding plagiarisms among a set of programs with JPlag. J. UCS 8, 11 (2002), 1016.
[21]
Zichao Qi, Fan Long, Sara Achour, and Martin Rinard. 2015. An analysis of patch plausibility and correctness for generate-and-validate patch generation systems. In Proceedings of the 2015 International Symposium on Software Testing and Analysis. ACM, 24--36.
[22]
Edward K Smith, Earl T Barr, Claire Le Goues, and Yuriy Brun. 2015. Is the cure worse than the disease? overfitting in automated program repair. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering. ACM, 532--543.
[23]
Westley Weimer, Zachary P Fry, and Stephanie Forrest. 2013. Leveraging program equivalence for adaptive program repair: Models and first results. In Proceedings of the 28th IEEE/ACM International Conference on Automated Software Engineering. IEEE Press, 356--366.
[24]
Cathrin Weiss, Rahul Premraj, Thomas Zimmermann, and Andreas Zeller. 2007. How long will it take to fix this bug?. In Proceedings of the Fourth International Workshop on Mining Software Repositories. IEEE Computer Society, 1.
[25]
Michael J Wise. 1993. String similarity via greedy string tiling and running Karp-Rabin matching. Online Preprint, Dec 119 (1993).

Cited By

View all
  • (2021)Accelerating redundancy-based program repair via code representation learning and adaptive patch filteringProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3473496(1672-1674)Online publication date: 20-Aug-2021

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
Internetware '17: Proceedings of the 9th Asia-Pacific Symposium on Internetware
September 2017
172 pages
ISBN:9781450353137
DOI:10.1145/3131704
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 September 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code search
  2. automated program repair
  3. code similarity

Qualifiers

  • Short-paper
  • Research
  • Refereed limited

Conference

Internetware'17

Acceptance Rates

Overall Acceptance Rate 55 of 111 submissions, 50%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)2
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2021)Accelerating redundancy-based program repair via code representation learning and adaptive patch filteringProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3473496(1672-1674)Online publication date: 20-Aug-2021

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media