Improved Crossover Operators for Genetic Programming for Program Repair

  • Vinicius Paulo L. Oliveira
  • Eduardo F. D. Souza
  • Claire Le Goues
  • Celso G. Camilo-JuniorEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9962)


GenProg is a stochastic method based on genetic programming that presents promising results in automatic software repair via patch evolution. GenProg’s crossover operates on a patch representation composed of high-granularity edits that indivisibly comprise an edit operation, a faulty location, and a fix statement used in replacement or insertions. Recombination of such high-level minimal units limits the technique’s ability to effectively traverse and recombine the repair search spaces. In this work, we propose a reformulation of program repair operators such that they explicitly traverse three subspaces that underlie the search problem: Operator, Fault Space and Fix Space. We leverage this reformulation in the form of new crossover operators that faithfully respect this subspace division, improving search performance. Our experiments on 43 programs validate our insight, and show that the Unif1Space without memorization performed best, improving the fix rate by 34 %.


Automatic software repair Automated program repair Evolutionary computation Crossover operator 


  1. 1.
    Ackling, T., Alexander, B., Grunert, I.: Evolving patches for software repair. In: Genetic and Evolutionary Computation, pp. 1427–1434 (2011)Google Scholar
  2. 2.
    Arcuri, A.: Evolutionary repair of faulty software. Appl. Soft Comput. 11(4), 3494–3514 (2011)CrossRefGoogle Scholar
  3. 3.
    Burlacu, B., Affenzeller, M., Winkler, S., Kommenda, M., Kronberger, G.: Methods for genealogy and building block analysis in genetic programming. In: Borowik, G., Chaczko, Z., Jacak, W., Łuba, T. (eds.) Computational Intelligence and Efficiency in Engineering Systems, Part I. SCI, vol. 595, pp. 61–74. Springer, Heidelberg (2015). doi: 10.1007/978-3-319-15720-7_5 Google Scholar
  4. 4.
    Chawdhry, P.K., Roy, R., Pant, R.K.: Soft Computing in Engineering Design and Manufacturing. Springer, Heidelberg (2012)Google Scholar
  5. 5.
    de Oliveira, A.A.L., Camilo-Junior, C.G., Vincenzi, A.M.R.: A coevolutionary algorithm to automatic test case selection and mutant in mutation testing. In: Congress on Evolutionary Computation, pp. 829–836 (2013)Google Scholar
  6. 6.
    Debroy, V., Eric Wong, E.: Using mutation to automatically suggest fixes for faulty programs. In: International Conference on Software Testing, Verification, and Validation, pp. 65–74 (2010)Google Scholar
  7. 7.
    Forrest, S., Nguyen, T., Weimer, W., Goues, C.L.: A genetic programming approach to automated software repair. In: Genetic and Evolutionary Computation Conference (GECCO), pp. 947–954 (2009)Google Scholar
  8. 8.
    Goldberg, D.E.: Genetic Algorithms in Search, Optimization and Machine Learning, 1st edn. Addison-Wesley Longman Publishing Co., Inc., Reading (1989)zbMATHGoogle Scholar
  9. 9.
    Harik, G.R., Lobo, F.G., Goldberg, D.E.: The compact genetic algorithm. IEEE Trans. Evol. Comput. 3(4), 287–297 (1999)CrossRefGoogle Scholar
  10. 10.
    John, H.: Adaptation in natural and artificial systems (1992)Google Scholar
  11. 11.
    Koza, J.R.: Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge (1992)zbMATHGoogle Scholar
  12. 12.
    Langdon, W.B., Harman, M.: Grow and graft a better CUDA pknot-sRG for RNA pseudoknot free energy calculation. In: Genetic and Evolutionary Computation Conference, GECCO Companion 2015, pp. 805–810 (2015)Google Scholar
  13. 13.
    Le Goues, C., Dewey-Vogt, M., Forrest, S., Weimer, W.: A systematic study of automated program repair: fixing 55 out of 105 bugs for $8 each. In: International Conference on Software Engineering, pp. 3–13 (2012)Google Scholar
  14. 14.
    Le Goues, C., Forrest, S., Weimer, W.: Current challenges in automatic software repair. Softw. Qual. J. 21(3), 421–443 (2013)CrossRefGoogle Scholar
  15. 15.
    Le Goues, C., Holtschulte, N., Smith, E.K., Brun, Y., Devanbu, P., Forrest, S., Weimer, W.: The ManyBugs and IntroClass benchmarks for automated repair of C programs. IEEE Trans. Softw. Eng. 41, 1236–1256 (2015)CrossRefGoogle Scholar
  16. 16.
    Le Goues, C., Nguyen, T.V., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. Softw. Eng. (TSE) 38, 54–72 (2012)CrossRefGoogle Scholar
  17. 17.
    Le Goues, C., Weimer, W., Forrest, S.: Representations and operators for improving evolutionary software repair. In: Genetic and Evolutionary Computation Conference (GECCO), pp. 959–966 (2012)Google Scholar
  18. 18.
    Long, F., Rinard, M.: Automatic patch generation by learning correct code. In: Principles of Programming Languages, POPL 2016, pp. 298–312 (2016)Google Scholar
  19. 19.
    Mechtaev, S., Yi, J., Roychoudhury, A.: Angelix: scalable multiline program patch synthesis via symbolic analysis. In: International Conference on Software Engineering, ICSE 2016, pp. 691–701 (2016)Google Scholar
  20. 20.
    Nunes, B., Quijano, E.H.D., Camilo-Junior, C.G., Rodrigues, C.: SBSTFrame: a framework to search-based software testing. In: International Conference on Systems, Man, and Cybernetics (2016)Google Scholar
  21. 21.
    Orlov, M., Sipper, M.: Flight of the FINCH through the Java wilderness. IEEE Trans. Evol. Comput. 15(2), 166–182 (2011)CrossRefGoogle Scholar
  22. 22.
    Pressman, R.S.: Software Engineering: A Practitioners Approach. Palgrave Macmillan, London (2005)Google Scholar
  23. 23.
    Qi, Y., Mao, X., Lei, Y., Dai, Z., Wang, C.: The strength of random search on automated program repair. In: Proceedings of the 36th International Conference on Software Engineering, pp. 254–265. ACM (2014)Google Scholar
  24. 24.
    Qi, Z., Long, F., Achour, S., Rinard, M.: An analysis of patch plausibility and correctness for generate-and-validate patch generation systems. In: International Symposium on Software Testing and Analysis, pp. 24–36 (2015)Google Scholar
  25. 25.
    Schulte, E., Dorn, J., Harding, S., Forrest, S., Weimer, W.: Post-compiler software optimization for reducing energy. In: Architectural Support for Programming Languages and Operating Systems, pp. 639–652 (2014)Google Scholar
  26. 26.
    Silva, S., Esparcia-Alcázar, A.I. (eds.): Genetic and Evolutionary Computation Conference, GECCO 2015, Companion Material Proceedings, Workshop on Genetic Improvement. ACM (2015)Google Scholar
  27. 27.
    Smith, E.K., Barr, E., Goues, C.L., Brun, Y.: Is the cure worse than the disease? Overfitting in automated program repair. In: Joint Meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE), pp. 532–543 (2015)Google Scholar
  28. 28.
    Weimer, W., Fry, Z.P., Forrest, S.: Leveraging program equivalence for adaptive program repair: models and first results. In: Automated Software Engineering (ASE), pp. 356–366 (2013)Google Scholar
  29. 29.
    Weimer, W., Nguyen, T., Le Goues, C., Forrest, S.: Automatically finding patches using genetic programming. In: International Conference on Software Engineering (ICSE), pp. 364–374 (2009)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • Vinicius Paulo L. Oliveira
    • 1
  • Eduardo F. D. Souza
    • 1
  • Claire Le Goues
    • 2
  • Celso G. Camilo-Junior
    • 1
    Email author
  1. 1.Instituto de Informatica - Universidade Federal de Goias (UFG)GoianiaBrazil
  2. 2.School of Computer ScienceCarnegie Mellon University (CMU)PittsburghUSA

Personalised recommendations