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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
ant.apache.org, camel.apache.org, ant.apache.org/ivy, jedit.org, logging.apache.org/log4j, lucene.apache.org, poi.apache.org.
References
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
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)
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)
Booch, G.: Object-oriented development. IEEE Trans. Softw. Eng. 12(2), 211–221 (1986)
Cartwright, M., Shepperd, M.: An empirical investigation of an object-oriented software system. IEEE Trans. Soft. Eng. 26(8), 786–796 (2000)
Chidamber, S., Kemerer, C.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)
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)
Field, A.: Discovering Statistics Using IBM SPSS Statistics, 4th edn. Sage Publications Ltd. (2013)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston (1999)
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)
Madeyski, L., Jureczko, M.: Which process metrics can significantly improve defect prediction models? An empirical study. Softw. Qual. J. 23(3), 393–422 (2015)
Meyer, B.: Object-Oriented Software Construction. Prentice-Hall, Hoboken (1997)
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)
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)
Runeson, P., Host, M., Rainer, A., Regnell, B.: Case Study Research in Software Engineering: Guidelines and Examples, 1st edn. Wiley, Hoboken (2012)
Spinellis, D.: Tool writing: a forgotten art? IEEE Softw. 22(4), 9–11 (2005)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
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)