Automatic Error Correction of Java Programs

  • Christian Kern
  • Javier Esparza
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6371)


We present a technique for automatically detecting and correcting software bugs. The programmer is required to define a catalog of hotspots, syntactic constructs she considered to be error prone (e.g. i < N), together with suitable alternatives (e.g. i < (N + 1) and i < (N - 1)). Given a faulty program, search techniques are then applied to find a combination of alternatives yielding a correct program. The technique is implemented on top of the Java Pathfinder Framework.


Java Program Program Variant Test Input Choice Point Correct Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ball, T., Naik, M., Rajamani, S.K.: From symptom to cause: localizing errors in counterexample traces. In: POPL, pp. 97–105 (2003)Google Scholar
  2. 2.
    Ball, T., Rajamani, S.K.: The slam toolkit. In: Berry, G., Comon, H., Finkel, A. (eds.) CAV 2001. LNCS, vol. 2102, pp. 260–264. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  3. 3.
    Clarke, E.M., Kroening, D., Lerda, F.: A tool for checking ansi-c programs. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 168–176. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  4. 4.
    Cleve, H., Zeller, A.: Locating causes of program failures. In: Roman, G.-C., Griswold, W.G., Nuseibeh, B. (eds.) ICSE, pp. 342–351. ACM, New York (2005)Google Scholar
  5. 5.
    Griesmayer, A., Staber, S., Bloem, R.: Automated fault localization for c programs. Electr. Notes Theor. Comput. Sci. 174(4), 95–111 (2007)CrossRefGoogle Scholar
  6. 6.
    Groce, A., Chaki, S., Kroening, D., Strichman, O.: Error explanation with distance metrics. STTT 8(3), 229–247 (2006)CrossRefGoogle Scholar
  7. 7.
    Groce, A., Visser, W.: What went wrong: Explaining counterexamples. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 121–135. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Hailpern, B., Santhanam, P.: Software debugging, testing, and verification. IBM Systems Journal 41(1), 4–12 (2002)CrossRefGoogle Scholar
  9. 9.
    Jobstmann, B., Griesmayer, A., Bloem, R.: Program repair as a game. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 226–238. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  10. 10.
    Jones, J.A., Harrold, M.J.: Empirical evaluation of the tarantula automatic fault-localization technique. In: Redmiles, D.F., Ellman, T., Zisman, A. (eds.) ASE, pp. 273–282. ACM, New York (2005)CrossRefGoogle Scholar
  11. 11.
    Staber, S., Jobstmann, B., Bloem, R.: Finding and fixing faults. In: Borrione, D., Paul, W. (eds.) CHARME 2005. LNCS, vol. 3725, pp. 35–49. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  12. 12.
    Visser, W., Havelund, K., Brat, G.P., Park, S., Lerda, F.: Model checking programs. Autom. Softw. Eng. 10(2), 203–232 (2003)CrossRefGoogle Scholar
  13. 13.
    Wang, C., Yang, Z., Ivancic, F., Gupta, A.: Whodunit? causal analysis for counterexamples. In: Graf, S., Zhang, W. (eds.) ATVA 2006. LNCS, vol. 4218, pp. 82–95. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  14. 14.
    Weimer, W., Nguyen, T.V., Le Goues, C., Forrest, S.: Automatically finding patches using genetic programming. In: ICSE, pp. 364–374. IEEE, Los Alamitos (2009)Google Scholar
  15. 15.
    Zeller, A.: Isolating cause-effect chains from computer programs. In: SIGSOFT FSE, pp. 1–10 (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Christian Kern
    • 1
  • Javier Esparza
    • 1
  1. 1.Technische Universität MünchenGermany

Personalised recommendations