Skip to main content
Log in

More efficient automatic repair of large-scale programs using weak recompilation

  • Research Paper
  • Progress of Projects Supported by NSFC
  • Published:
Science China Information Sciences Aims and scope Submit manuscript

Abstract

Automatically repairing a bug can be a time-consuming process especially for large-scale programs owing to the significant amount of time spent recompiling and reinstalling the patched program. To reduce this time overhead and speed up the repair process, in this paper we present a recompilation technique called weak recompilation. In weak recompilation, we assume that a program consists of a set of components, and for each candidate patch only the altered components are recompiled to a shared library. The original program is then dynamically updated by a function indirection mechanism. The advantage of weak recompilation is that redundant recompilation cost can be avoided, and while the reinstallation cost is completely eliminated as the original executable program is not modified at all. For maximum applicability of weak recompilation we created WAutoRepair, a scalable system for fixing bugs with high efficiency in large-scale C programs. The experiments on real bugs in widely used programs show that our repair system significantly outperforms Genprog, a well-known approach to automatic program repair. For the wireshark program containing over 2 million lines of code, WAutoRepair is over 128 times faster in terms of recompilation cost than Genprog.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Harman M. Automated patching techniques: the fix is in: technical perspective. Commun ACM, 2010, 53: 108

    Article  Google Scholar 

  2. Le Goues C, Nguyen T, Forrest S, et al. GenProg: a generic method for automatic software repair. IEEE Trans Softw Eng, 2012, 38: 54–72

    Article  Google Scholar 

  3. Arcuri A. Evolutionary repair of faulty software. Appl Soft Comput, 2011, 11: 3494–3514

    Article  Google Scholar 

  4. Pei Y, Wei Y, Furia C A, et al. Code-based automated program fixing. In: International Conference on Automated Software Engineering, Lawrence, 2011. 392–395

  5. Debroy V, Wong W E. Using mutation to automatically suggest fixes for faulty programs. In: International Conference on Software Testing, Verification and Validation, Paris, 2010. 65–74

  6. Jin G L, Song L H, Zhang W, et al. Automated atomicity-violation fixing. In: Programming Language Design and Implementation, San Jose, 2011. 389–400

  7. Xu M W, Li Q, Yang Y, et al. Self-healing routing: failure, modeling and analysis. Sci China Inf Sci, 2011, 54: 609–622

    Article  Google Scholar 

  8. Weimer W, Forrest S, Le Goues C, et al. Automatic program repair with evolutionary computation. Commun ACM, 2010, 53: 109–116

    Article  Google Scholar 

  9. Le Goues C, Dewey V M, Forrest S, et al. A systematic study of automated program repair: fixing 55 out of 105 bugs for $8 each. In: International Conference on Software Engineering, Zurich, 2012. 3–13

  10. Byoungju C, Mathur A P. High-performance mutation testing. J Syst Soft, 1993, 20: 135–152

    Article  Google Scholar 

  11. DeMillo R, Lipton R J, Sayward F G. Hints on test data selection: help for the practicing programmer. Computer, 1978, 11: 34–41

    Article  Google Scholar 

  12. Jia Y, Harman M. An analysis and survey of the development of mutation testing. IEEE Trans Softw Eng, 2011, 37: 649–678

    Article  Google Scholar 

  13. Schwartz M D, Delisle N M, Begwani V S. Incremental compilation in magpie. In: SIGPLAN Symposium on Compiler Construction, Montreal, 1984. 122–131

  14. Edward W K J. Compiler-Integrated software testing. Ph.D. thesis. West Lafayette: Purdue University, 1991

    Google Scholar 

  15. Ackling T, Alexander B, Grunert I. Evolving patches for software repair. In: Genetic and Evolutionary Computation, Dublin, 2011. 1427–1434

    Google Scholar 

  16. Ali S, Andrews J H, Dhandapani T, et al. Evaluating the accuracy of fault localization techniques. In: International Conference on Automated Software Engineering, Auckland, 2009. 76–87

  17. Nethercote N. Dynamic binary analysis and instrumentation. Ph.D. thesis. Cambridge: University of Cambridge, 2004

    Google Scholar 

  18. Le Goues C, Weimer W, Forrest S. Representations and operators for improving evolutionary software repair. In: Genetic and Evolutionary Computation, Philadelphia, 2012. 959–966

  19. Arcuri A. On the automation of fixing software bugs. In: International Conference on Software Engineering, Leipzig, 2008. 1003–1006

  20. Jones J A, Harrold M J. Empirical evaluation of the tarantula automatic fault-localization technique. In: International Conference on Automated Software Engineering, Long Beach, 2005. 273–282

  21. Wei Y, Pei Y, Furia C A, et al. Automated fixing of programs with contracts. In: International Symposium on Software Testing and Analysis, Trento, 2010. 61–72

  22. Wei Y, Furia C A, Kazmin N, et al. Inferring better contracts. In: International Conference on Software Engineering, Waikiki, 2011. 191–200

  23. Dallmeier V, Zeller A, Meyer B. Generating fixes from object behavior anomalies. In: International Conference on Automated Software Engineering, Auckland, 2009. 550–554

  24. Howden W. Weak mutation testing and completeness of test sets. IEEE Trans Softw Eng, 1982, 8: 371–379

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to XiaoGuang Mao.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Qi, Y., Mao, X., Wen, Y. et al. More efficient automatic repair of large-scale programs using weak recompilation. Sci. China Inf. Sci. 55, 2785–2799 (2012). https://doi.org/10.1007/s11432-012-4741-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11432-012-4741-1

Keywords

Navigation