skip to main content
10.1145/2568225.2568303acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Data-guided repair of selection statements

Published:31 May 2014Publication History

ABSTRACT

Database-centric programs form the backbone of many enterprise systems. Fixing defects in such programs takes much human effort due to the interplay between imperative code and database-centric logic. This paper presents a novel data-driven approach for automated fixing of bugs in the selection condition of database statements (e.g., WHERE clause of SELECT statements) – a common form of bugs in such programs. Our key observation is that in real-world data, there is information latent in the distribution of data that can be useful to repair selection conditions efficiently. Given a faulty database program and input data, only a part of which induces the defect, our novelty is in determining the correct behavior for the defect-inducing data by taking advantage of the information revealed by the rest of the data. We accomplish this by employing semi-supervised learning to predict the correct behavior for defect-inducing data and by patching up any inaccuracies in the prediction by a SAT-based combinatorial search. Next, we learn a compact decision tree for the correct behavior, including the correct behavior on the defect-inducing data. This tree suggests a plausible fix to the selection condition. We demonstrate the feasibility of our approach on seven realworld examples.

References

  1. Thomas Ackling, Bradley Alexander, and Ian Grunert. Evolving patches for software repair. In GECCO, pages 1427–1434, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Kristin P. Bennett and Colin Campbell. Support vector machines: hype or hallelujah? SIGKDD Explor. Newsl., 2(2):1–13, December 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Lionel C. Briand, Yvan Labiche, and Xuetao Liu. Using machine learning to support debugging with Tarantula. In ISSRE, pages 137–146, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Satish Chandra, Emina Torlak, Shaon Barman, and Rastislav Bodik. Angelic debugging. In ICSE, pages 121–130, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Vidroha Debroy and W. Eric Wong. Using mutation to automatically suggest fixes for faulty programs. In ICST, pages 65–74, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Divya Gopinath, Sarfraz Khurshid, Diptikalyan Saha, and Satish Chandra. Data-Guided Repair of Selection Statements. Technical report, IBM Research. India, 2014. IBM Technical Report RI14004, available from http://domino.watson.ibm.com/library/CyberDig.nsf/home.Google ScholarGoogle Scholar
  7. Divya Gopinath, Muhammad Zubair Malik, and Sarfraz Khurshid. Specification-based program repair using SAT. In TACAS, pages 173–188, March 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Andreas Griesmayer, Roderick Bloem, and Byron Cook. Repair of boolean programs with an application to C. In CAV, pages 358–371, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sumit Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, pages 317–330, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Sumit Gulwani, Susmit Jha, Ashish Tiwari, and Ramarathnam Venkatesan. Synthesis of loop-free programs. In PLDI, pages 62–73, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Daniel Jackson. Alloy: a lightweight object modelling notation. ACM Trans. Softw. Eng. Methodol., 11(2), April 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Lingxiao Jiang and Zhendong Su. Context-aware statistical debugging: from bug predictors to faulty control flow paths. In ASE, pages 184–193, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Joachims. Making large-scale svm learning practical. Advances in Kernel Methods - Support Vector Learning, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. Jobstmann, A. Griesmayer, and R. Bloem. Program repair as a game. In CAV, pages 226–238, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. James A. Jones, James F. Bowring, and Mary Jean Harrold. Debugging in parallel. In ISSTA, pages 16–26, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. James A. Jones, Mary Jean Harrold, and John Stasko. Visualization of test information to assist fault localization. In ICSE, pages 467–477, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Sarfraz Khurshid, Iván García, and Yuk Lai Suen. Repairing structurally complex data. In SPIN, pages 123–138, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Viktor Kuncak, Mikael Mayer, Ruzica Piskac, and Philippe Suter. Complete functional synthesis. In PLDI, pages 316–329, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Ben Liblit, Mayur Naik, Alice X. Zheng, Alex Aiken, and Michael I. Jordan. Scalable statistical bug isolation. In PLDI, pages 15–26, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Z. Malik, K. Ghori, B. Elkarablieh, and S. Khurshid. A case for automated debugging using data structure repair. In ASE, pages 615–619, November 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Mitchell. Machine Learning. McGraw Hill, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Rishabh Singh and Armando Solar-Lezama. SPT: Storyboard programming tool. In CAV, pages 738–743, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Armando Solar-Lezama. The sketching approach to program synthesis. In APLAS, pages 4–13, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. V. Vapnik. The Nature of Statistical Learning Theory. Springer Verlag, 1995. Google ScholarGoogle ScholarCross RefCross Ref
  25. Yi Wei, Yu Pei, Carlo A. Furia, Lucas S. Silva, Stefan Buchholz, Bertrand Meyer, and Andreas Zeller. Automated fixing of programs with contracts. In ISSTA, pages 61–72, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Westley Weimer, ThanhVu Nguyen, Claire Le Goues, and Stephanie Forrest. Automatically finding patches using genetic programming. In ICSE, pages 364–374, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Data-guided repair of selection statements

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                ICSE 2014: Proceedings of the 36th International Conference on Software Engineering
                May 2014
                1139 pages
                ISBN:9781450327565
                DOI:10.1145/2568225

                Copyright © 2014 ACM

                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]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 31 May 2014

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                Overall Acceptance Rate276of1,856submissions,15%

                Upcoming Conference

                ICSE 2025

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader