Skip to main content

Where the Bugs are: A Quasi-replication Study of the Effect of Inheritance Depth and Width in Java Systems

  • Conference paper
  • First Online:
  • 1228 Accesses

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1439))

Abstract

The role of inheritance in the OO paradigm and its inherent complexity has caused conflicting results in the software engineering community. In a seminal empirical study, Basili et al., suggest that, based on a critique of the Chidamber and Kemerer OO metrics suite, a class located deeper in an inheritance hierarchy will introduce more bugs because it inherits a large number of definitions from its ancestors. Equally, classes with a large number of children (i.e., descendants) are difficult to modify and usually require more testing because the class potentially affects all of its children. In this paper, we use a large data set containing bug and inheritance data from eleven Java systems (seven open-source and four commercial) to explore these two research questions. We explore whether it is the case that a class deeper in the hierarchy is more buggy because of its deep position. Equally, we explore whether there is a positive relationship between the number of children and bugs, if classes with large numbers of children are indeed more difficult to modify. Results showed no specific trend for classes deeper in the hierarchy to be more buggy vis-a-vis shallower classes; the four commercial systems actually showed a negative relationship. The majority of classes across the hierarchy were also found to have no children and those classes included the most buggy.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    ant.apache.org, camel.apache.org, ant.apache.org/ivy, jedit.org, logging.apache.org/log4j, lucene.apache.org, poi.apache.org.

References

  1. Ampatzoglou, A., Bibi, S., Avgeriou, P., Chatzigeorgiou, A.: Guidelines for managing threats to validity of secondary studies in software engineering. In: Felderer, M., Travassos, G. (eds.) Contemporary Empirical Methods in Software Engineering, pp. 415–441. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-32489-6_15

    Chapter  Google Scholar 

  2. Basili, V.R., Briand, L.C., Melo, W.L.: A validation of object-oriented design metrics as quality indicators. IEEE Trans. Softw. Eng. 22(10), 751–761 (1996)

    Article  Google Scholar 

  3. Bieman, J.M., Zhao, J.: Reuse through inheritance: a quantitative study of C++ software. In: ACM SIGSOFT Symposium on Software Reusability, Seattle, USA, pp. 47–52 (1995)

    Google Scholar 

  4. Booch, G.: Object-oriented development. IEEE Trans. Softw. Eng. 12(2), 211–221 (1986)

    Article  Google Scholar 

  5. Cartwright, M., Shepperd, M.: An empirical investigation of an object-oriented software system. IEEE Trans. Soft. Eng. 26(8), 786–796 (2000)

    Article  Google Scholar 

  6. Chidamber, S., Kemerer, C.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)

    Article  Google Scholar 

  7. Daly, J., Brooks, A., Miller, J., Roper, M., Wood, M.: Evaluating inheritance depth on the maintainability of object-oriented software. Empir. Softw. Eng. 1(2), 109–132 (1996)

    Article  Google Scholar 

  8. Field, A.: Discovering Statistics Using IBM SPSS Statistics, 4th edn. Sage Publications Ltd. (2013)

    Google Scholar 

  9. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston (1999)

    MATH  Google Scholar 

  10. Harrison, R., Counsell, S., Nithi, R.: Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems. J. Syst. Softw. 52(2–3), 173–179 (2000)

    Article  Google Scholar 

  11. Madeyski, L., Jureczko, M.: Which process metrics can significantly improve defect prediction models? An empirical study. Softw. Qual. J. 23(3), 393–422 (2015)

    Article  Google Scholar 

  12. Meyer, B.: Object-Oriented Software Construction. Prentice-Hall, Hoboken (1997)

    MATH  Google Scholar 

  13. Nasseri, E., Shepperd, M.J.: Class movement and re-location: an empirical study of java inheritance evolution. J. Syst. Softw. 83(2), 303–315 (2010)

    Article  Google Scholar 

  14. Prechelt, L., Unger, B., Philippsen, M., Tichy, W.: A controlled experiment on inheritance depth as a cost factor for code maintenance. J. Syst. Softw. 65(2), 115–126 (2003)

    Article  Google Scholar 

  15. Runeson, P., Host, M., Rainer, A., Regnell, B.: Case Study Research in Software Engineering: Guidelines and Examples, 1st edn. Wiley, Hoboken (2012)

    Book  Google Scholar 

  16. Spinellis, D.: Tool writing: a forgotten art? IEEE Softw. 22(4), 9–11 (2005)

    Article  Google Scholar 

  17. Wood, M., Daly, J., Miller, J., Roper, M.: Multi-method research: an empirical investigation of object-oriented technology. J. Syst. Softw. 48(1), 13–26 (1999)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Steve Counsell .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Counsell, S., Swift, S., Tahir, A. (2021). Where the Bugs are: A Quasi-replication Study of the Effect of Inheritance Depth and Width in Java Systems. In: Paiva, A.C.R., Cavalli, A.R., Ventura Martins, P., Pérez-Castillo, R. (eds) Quality of Information and Communications Technology. QUATIC 2021. Communications in Computer and Information Science, vol 1439. Springer, Cham. https://doi.org/10.1007/978-3-030-85347-1_33

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-85347-1_33

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-85346-4

  • Online ISBN: 978-3-030-85347-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics