Skip to main content
Log in

A study of effectiveness of dynamic slicing in locating real faults

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

Dynamic slicing algorithms have been considered to aid in debugging for many years. However, as far as we know, no detailed studies on evaluating the benefits of using dynamic slicing for locating real faults present in programs have been carried out. In this paper we study the effectiveness of fault location using dynamic slicing for a set of real bugs reported in some widely used software programs. Our results show that of the 19 faults studied, 12 faults were captured by data slices, 7 required the use of full slices, and none of them required the use of relevant slices. Moreover, it was observed that dynamic slicing considerably reduced the subset of program statements that needed to be examined to locate faulty statements. Interestingly, we observed that all of the memory bugs in the faulty versions were captured by data slices. The dynamic slices that captured faulty code included 0.45 to 63.18% of statements that were executed at least once.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  • Agrawal H, Horgan J (1990) Dynamic program slicing. ACM SIGPLAN conference on programming language design and implementation, pp 246–256

  • Agrawal H, DeMillo R, Spafford E (1993a) Debugging with dynamic slicing and backtracking. Software Practice and Experience 23(6):589–616

    Article  Google Scholar 

  • Agrawal H, Horgan EW Jr, London SA (1993b) Incremental regression testing. IEEE conference on software maintenance, Montreal, Canada, pp 348–357

  • Agrawal H, Horgan J, London S, Wong W (1995) Fault localization using execution slices and dataflow tests. 6th IEEE international symposium on software reliability engineering, 143–151

  • Antoniol G, Fiutem R, Lutteri G, Tonella P, Zanfei, S, Merlo E (1997, October) Program understanding and maintenance with the CANTO environment. International conference on software maintenance, pp 72–, Bari, Italy

  • Ball T, Eick SG (1994, October) Visualizing program slices. IEEE Symposium on Visual Languages, pp 288–295, St. Louis, Missouri

  • Beszedes A, Gergely T, Szabo ZM, Csirik J, Gyimothy T (2001, March) Dynamic slicing method for maintenance of large C programs. 5th European conference on software maintenance and reengineering, pp 105–113

  • Cleve H, Andreas Zeller (2005) Locating causes of program failures. 27th international conference on software engineering, pp 342–351

  • Gyimothy T, Beszedes A, Forgacs I (1999) An efficient relevant slicing method for debugging. 7th European software engineering conference and 7th ACM SIGSOFT international symposium on foundations of software engineering. Toulouse, France, pp 303–321

  • Hildebrandt R, Zeller A (2000) Simplifying failure-inducing input. International symposium on software testing and analysis, pp 135–145

  • Hutchins M, Foster H, Goradia T, Ostrand T (1994) Experiments on the effectiveness of dataflow- and controlflow-based test adequacy criteria. 16th international conference on software engineering, pp 191–200

  • Jones JA (2004) Fault localization using visualization of test information. 26th international conference on software engineering, pp 54–56

  • Kamkar M (1993) Interprocedural dynamic slicing with applications to debugging and testing. Ph.D. thesis, Linkoping University

  • Korel B, Laski J (1988) Dynamic program slicing. Inf Process Lett 29(3):155–163

    Article  MATH  Google Scholar 

  • Korel B, Rilling J (1997) Application of dynamic slicing in program debugging. 3rd international workshop on automatic debugging. Linkoping, Sweden, pp 43–58

  • Krinke J (2004) Visualization of program dependence and slices. International conference on software maintenance, pp 168–177

  • Lin-Nielsen J BuDDy, A binary decision diagram package. Department of Information Technology, Technical University of Denmark, http://www.itu.dk/research/buddy/.

  • Pan H, Spafford EH (1992) Heuristics for automatic localization of software faults. Technical Report SERC-TR-116-P, Purdue University

  • Renieris M, Reiss S (2003) Fault localization with nearest neighbor queries. IEEE international conference on automated software engineering, pp 30–39

  • Weiser M (1982) Program slicing. IEEE Trans Softw Eng SE-10(4):352–357

    Article  Google Scholar 

  • Zeller A (2002) Isolating cause-effect chains from computer programs. 10th ACM SIGSOFT symposium on foundations of software engineering. Charleston, South Carolina, pp 1–10

  • Zhang X, Gupta R (2004, June) Cost effective dynamic program slicing. ACM SIGPLAN conference on programming language design and implementation, pp 94–106

  • Zhang X, Gupta R, Zhang Y (2003, May) Precise dynamic slicing algorithms. IEEE/ACM international conference on software engineering, Portland, Oregon, pp 319–329

  • Zhang X, Gupta R, Zhang Y (2004) Effective forward computation of dynamic slices using reduced ordered binary decision diagrams. IEEE international conference on software engineering. Edinburgh, UK, pp 502–511

  • Zhang X, He H, Gupta N, Gupta R (2005, September) Experimental evaluation of using dynamic slices for fault location. SIGSOFT-SIGPLAN sixth international symposium on automated and analysis-driven debugging. Moterey, California, pp 33–42

  • Zhou P, Liu W, Fei L, Lu S, Qin F, Zhou Y, Midkiff SP, Torrellas J (2004) AccMon: automatically detecting memory-related bugs via program counter-based invariants. 37th annual international symposium on microarchitecture, pp 269–280

Download references

Acknowledgments

This work is supported by grants from Microsoft, IBM, and NSF grants CNS-0614707, CCF-0541382, CCF-0324969, and EIA-0080123 to the University of Arizona. We would like to thank the reviewers for their suggestions that encouraged us to do even more thorough job of revising the original submission.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rajiv Gupta.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Zhang, X., Gupta, N. & Gupta, R. A study of effectiveness of dynamic slicing in locating real faults. Empir Software Eng 12, 143–160 (2007). https://doi.org/10.1007/s10664-006-9007-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10664-006-9007-3

Keywords

Navigation