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.
Similar content being viewed by others
References
Harman M. Automated patching techniques: the fix is in: technical perspective. Commun ACM, 2010, 53: 108
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
Arcuri A. Evolutionary repair of faulty software. Appl Soft Comput, 2011, 11: 3494–3514
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
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
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
Xu M W, Li Q, Yang Y, et al. Self-healing routing: failure, modeling and analysis. Sci China Inf Sci, 2011, 54: 609–622
Weimer W, Forrest S, Le Goues C, et al. Automatic program repair with evolutionary computation. Commun ACM, 2010, 53: 109–116
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
Byoungju C, Mathur A P. High-performance mutation testing. J Syst Soft, 1993, 20: 135–152
DeMillo R, Lipton R J, Sayward F G. Hints on test data selection: help for the practicing programmer. Computer, 1978, 11: 34–41
Jia Y, Harman M. An analysis and survey of the development of mutation testing. IEEE Trans Softw Eng, 2011, 37: 649–678
Schwartz M D, Delisle N M, Begwani V S. Incremental compilation in magpie. In: SIGPLAN Symposium on Compiler Construction, Montreal, 1984. 122–131
Edward W K J. Compiler-Integrated software testing. Ph.D. thesis. West Lafayette: Purdue University, 1991
Ackling T, Alexander B, Grunert I. Evolving patches for software repair. In: Genetic and Evolutionary Computation, Dublin, 2011. 1427–1434
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
Nethercote N. Dynamic binary analysis and instrumentation. Ph.D. thesis. Cambridge: University of Cambridge, 2004
Le Goues C, Weimer W, Forrest S. Representations and operators for improving evolutionary software repair. In: Genetic and Evolutionary Computation, Philadelphia, 2012. 959–966
Arcuri A. On the automation of fixing software bugs. In: International Conference on Software Engineering, Leipzig, 2008. 1003–1006
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
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
Wei Y, Furia C A, Kazmin N, et al. Inferring better contracts. In: International Conference on Software Engineering, Waikiki, 2011. 191–200
Dallmeier V, Zeller A, Meyer B. Generating fixes from object behavior anomalies. In: International Conference on Automated Software Engineering, Auckland, 2009. 550–554
Howden W. Weak mutation testing and completeness of test sets. IEEE Trans Softw Eng, 1982, 8: 371–379
Author information
Authors and Affiliations
Corresponding author
Rights 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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11432-012-4741-1