kirancodes.me
To Proof Maintenance & Beyond!

Data-guided repair of selection statements

Divya Gopinath, Sarfraz Khurshid, Diptikalyan Saha, Satish Chandra

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.

BibTeX
@inproceedings{Gopinath-al:ICSE14,
  author    = {Divya Gopinath and
               Sarfraz Khurshid and
               Diptikalyan Saha and
               Satish Chandra},
  title     = {Data-guided repair of selection statements},
  booktitle = {ICSE},
  pages     = {243--253},
  publisher = {{ACM}},
  year      = {2014},
}

Related papers