Empirical Software Engineering

, Volume 20, Issue 1, pp 176–205 | Cite as

Mining software repair models for reasoning on the search space of automated program fixing

Article

Abstract

This paper is about understanding the nature of bug fixing by analyzing thousands of bug fix transactions of software repositories. It then places this learned knowledge in the context of automated program repair. We give extensive empirical results on the nature of human bug fixes at a large scale and a fine granularity with abstract syntax tree differencing. We set up mathematical reasoning on the search space of automated repair and the time to navigate through it. By applying our method on 14 repositories of Java software and 89,993 versioning transactions, we show that not all probabilistic repair models are equivalent.

Keywords

Mining software repositories Automated software repair Search-based software engineering 

References

  1. Alali A, Kagdi H, Maletic J (2008) What’s a typical commit? a characterization of open source software repositories. In: Proceedings of the IEEE international conference on program comprehensionGoogle Scholar
  2. Arcuri A (2011) Evolutionary repair of faulty software. Appl Soft Comput 11(4):3494–3514CrossRefGoogle Scholar
  3. Arcuri A, Briand L (2011) A practical guide for using statistical tests to assess randomized algorithms in software engineering. In: Proceedings of the 33rd international conference on software engineering. ACM, pp 1–10Google Scholar
  4. Bird C, Bachmann A, Aune E, Duffy J, Bernstein A, Filkov V, Devanbu P (2009) Fair and balanced?: bias in bug-fix datasets. In: Proceedings of the 7th joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE ’09. ACM, pp 121–130Google Scholar
  5. Bóna M (2011) A walk through combinatorics: an introduction to enumeration and graph theory. World ScientificGoogle Scholar
  6. Carzaniga A, Gorla A, Perino N, Pezzè M (2010) Automatic workarounds for web applications. In: Proceedings of the 2010 foundations of software engineering conference. ACM, pp 237–246Google Scholar
  7. Cohen J et al (1960) A coefficient of agreement for nominal scales. Educ Psychol Meas 20(1):37–46CrossRefGoogle Scholar
  8. Dallmeier V, Zeller A, Meyer B (2009) Generating fixes from object behavior anomalies. In: Proceedings of the international conference on automated software engineeringGoogle Scholar
  9. Debroy V, Wong W (2010) Using mutation to automatically suggest fixes for faulty programs. In: Proceedings of the International Conference on Software Testing, vERIFICATION AND vALIDAtion (ICST). IEEE, pp 65–74Google Scholar
  10. Department of Mathematics of the University of York (2013) Statistical tables. http://www.york.ac.uk/depts/maths/tables/. Accessed 9 Apr 2013
  11. Fluri B, Wursch M, Pinzger M, Gall H (2007) Change distilling: tree differencing for fine-grained source code change extraction. IEEE Trans Softw Eng 33:725–743CrossRefGoogle Scholar
  12. Fluri B, Giger E, Gall HC (2008) Discovering patterns of change types. In: Proceedings of the international conference on automated software engineeringGoogle Scholar
  13. German DM (2006) An empirical study of fine-grained software modifications. Empir Software Eng 11(3):369–393CrossRefGoogle Scholar
  14. Giger E, Pinzger M, Gall H, Xie T, Zimmermann T (2011) Comparing fine-grained source code changes and code churn for bug prediction. In: Working conference on mining software repositoriesGoogle Scholar
  15. Giger E, Pinzger M, Gall HC (2012) Can we predict types of code changes? an empirical analysis. In: Proceedings of the working conference on mining software repositories, pp 217–226Google Scholar
  16. Gopinath D, Malik MZ, Khurshid S (2011) Specification-based program repair using sat. In: Proceedings of the international conference on tools and algorithms for the construction and analysis of systemsGoogle Scholar
  17. Hattori L, Lanza M (2008) On the nature of commits. In: Proceedings of 4th international ERCIM workshop on software evolution and evolvabillity (EVOL), pp 63–71Google Scholar
  18. Hindle A, German DM, Holt R (2008) What do large commits tell us?: a taxonomical study of large commits. In: Proceedings of the international working conference on mining software repositoriesGoogle Scholar
  19. Hindle A, German D, Godfrey M, Holt R (2009) Automatic classication of large changes into maintenance categories. In: Proceedings of the debroInternational conference on program comprehensionGoogle Scholar
  20. Joseph FL (1971) Measuring nominal scale agreement among many raters. Psychol Bull 76(5):378–382CrossRefGoogle Scholar
  21. Kim D, Nam J, Song J, Kim S (2013) Automatic patch generation learned from human-written patches. In: Proceedings of the 2013 international conference on software engineering. IEEE Press, pp 802–811Google Scholar
  22. Kim S, Pan K, Whitehead EJ (2006) Memories of bug fixes. In: Proceedings of the 14th ACM SIGSOFT international symposium on foundations of software engineeringGoogle Scholar
  23. Landis JR, Koch GG (1977) The measurement of observer agreement for categorical data. Biometrics 33(1):159–174CrossRefMATHMathSciNetGoogle Scholar
  24. Le Goues C,Weimer W, Forrest S (2012) Representations and operators for improving evolutionary software repair. In: Proceedings of GECCO, pp 959–966Google Scholar
  25. Livshits B, Zimmermann T (2005) Dynamine: finding common error patterns by mining software revision histories. In: Proceedings of the European software engineering conference held jointly with International Symposium on Foundations of Software EngineeringGoogle Scholar
  26. Martinez M, Monperrus M (2012a) Mining repair actions for guiding automated program fixing. Tech. rep., INRIAGoogle Scholar
  27. Martinez M, Monperrus M (2012b) Appendix of “On Mining Software Repair Models and their Relations to the Search Space of Automated Program Fixing.” Tech. Rep. hal-00903804, INRIA,Google Scholar
  28. Monperrus M, Martinez M (2012) Cvs-vintage: a dataset of 14 cvs repositories of java software. Tech. rep., INRIAGoogle Scholar
  29. Murgia A, Concas G, Marchesi M, Tonelli R (2010) A machine learning approach for text categorization of fixing-issue commits on CVS. In: Proceedings of the international symposium on empirical software engineering and measurementGoogle Scholar
  30. Neamtiu I, Foster JS, Hicks M (2005) Understanding source code evolution using abstract syntax tree matching. In: Proceedings of the international workshop on mining software repositoriesGoogle Scholar
  31. Pan K, Kim S, Whitehead EJ (2008) Toward an understanding of bug fix patterns. Empir Softw Eng 14(3):286–315CrossRefGoogle Scholar
  32. Purushothaman R, Perry D (2005) Toward understanding the rhetoric of small source code changes. IEEE Trans Softw Eng 31:511–526CrossRefGoogle Scholar
  33. Raghavan S, Rohana R, Leon D, Podgurski A, Augustine V (2004) Dex: a semantic-graph differencing tool for studying changes in large code bases. In: Proceedings of the 20th IEEE international conference on software maintenanceGoogle Scholar
  34. Robbes R (2008) Of change and software. PhD thesis, University of LuganoGoogle Scholar
  35. Vaucher S, Sahraoui H, Vaucher J (2008) Discovering new change patterns in object-oriented systems. In: Proceedings of the working conference on reverse engineeringGoogle Scholar
  36. Wei Y, Pei Y, Furia CA, Silva LS, Buchholz S, Meyer B, Zeller A (2010) Automated fixing of programs with contracts. In: Proceedings of the international symposium on software testing and analysis. ACGoogle Scholar
  37. Weimer W (2006) Patches as better bug reports. In: Proceedings of the international conference on generative programming and component engineeringGoogle Scholar
  38. Weimer W, Nguyen T, Goues CL, Forrest S (2009) Automatically finding patches using genetic programming. In: Proceedings of the international conference on software engineeringGoogle Scholar
  39. Williams CC, Hollingsworth JK (2005) Automatic mining of source code repositories to improve bug finding techniques. IEEE Trans Softw Eng 31(6):466–480CrossRefGoogle Scholar
  40. Wu R, Zhang H, Kim S, Cheung S-C (2011) Relink: recovering links between bugs and changes. In: Proceedings of the 2011 foundations of software engineering conference, pp 15–25Google Scholar

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  1. 1.University of LilleLilleFrance
  2. 2.INRIALilleFrance

Personalised recommendations