Skip to main content

How Do Java Programs Use Inheritance? An Empirical Study of Inheritance in Java Software

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5142))

Abstract

Inheritance is a crucial part of object-oriented programming, but its use in practice, and the resulting large-scale inheritance structures in programs, remain poorly understood. Previous studies of inheritance have been relatively small and have generally not considered issues such as Java’s distinction between classes and interfaces, nor have they considered the use of external libraries.

In this paper we present the first substantial empirical study of the large-scale use of inheritance in a contemporary OO programming language. We present a suite of structured metrics for quantifying inheritance in Java programs. We present the results of performing a corpus analysis using those metrics to over 90 applications consisting of over 100,000 separate classes and interfaces. Our analysis finds higher use of inheritance than anticipated, variation in the use of inheritance between interfaces and classes, and differences between inheritance within application types compared with inheritance from external libraries.

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   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Taivalsaari, A.: On the notion of inheritance. Comp. Surv. 28(3), 438–479 (1996)

    Article  Google Scholar 

  2. Meyer, B.: Reusability: the case for object-oriented design. IEEE Software, 50–64 (March 1987)

    Google Scholar 

  3. Snyder, A.: Inheritance and the development of encapsulated software components. In: Research Directions in Object Oriented Programming, pp. 165–188. MIT Press, Cambridge (1987)

    Google Scholar 

  4. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns. Addison Wesley Publishing Company, One Jacob Way, Reading, Massachusetts 01867 (1994)

    Google Scholar 

  5. Johnson, R.E., Foote, B.: Designing reusable classes. Journal of Object-Oriented Programming (June/July 1988)

    Google Scholar 

  6. Rumbaugh, J., Jacobson, I., Booch, G.: Unified Modeling Language Reference Manual, 2nd edn. Addison-Wesley, Reading (2004)

    Google Scholar 

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

    Article  Google Scholar 

  8. Cartwright, M.: An empirical view of inheritance. Information and Software Technology 40, 795–799 (1998)

    Article  Google Scholar 

  9. Harrison, R., Counsell, S., Nithi, R.: Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems. Journal of Systems and Software 52, 173–179 (2000)

    Article  Google Scholar 

  10. Chidamber, S.R., Kemerer, C.F.: Towards a metrics suite for object oriented design. In: ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 197–211 (1991)

    Google Scholar 

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

    Article  Google Scholar 

  12. Manel, D., Havanas, W.: A study of the impact of C++ on software maintenance. In: International Conference on Software Maintenance, pp. 63–69 (1990)

    Google Scholar 

  13. Succi, G., Pedrycz, W., Djokic, S., Zuliani, P., Russo, B.: An empirical exploration of the distributions of the Chidamber and Kemerer object-oriented metrics suite. Empirical Softw. Engg. 10(1), 81–104 (2005)

    Article  Google Scholar 

  14. Collberg, C., Myles, G., Stepp, M.: An empirical study of Java bytecode programs. Softw. Pract. Exper. 37(6), 581–641 (2007)

    Article  Google Scholar 

  15. Chidamber, S., Darcy, D., Kemerer, C.: Managerial use of metrics for object-oriented software: an exploratory analysis. IEEE Trans. Software Engineering 24(8), 629–639 (1998)

    Article  Google Scholar 

  16. 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 

  17. Briand, L.C., Daly, J., Porter, V., Wüst, J.K.: A comprehensive empirical validation of design measures for object-oriented systems. In: METRICS 1998: Proceedings of the 5th International Symposium on Software Metrics, pp. 246–257. IEEE Computer Society Press, Los Alamitos (1998)

    Google Scholar 

  18. Kitchenham, B., Pfleeger, S.L., Fenton, N.: Towards a framework for software measurement validation. IEEE Trans. Softw. Eng. 21(12), 929–944 (1995)

    Article  Google Scholar 

  19. Melton, H., Tempero, E.: An empirical study of cycles among classes in Java. Empirical Software Engineering 12(4), 389–415 (2007)

    Article  Google Scholar 

  20. Qualitas Research Group: Qualitas corpus (June 2007), http://www.cs.auckland.ac.nz/~ewan/corpus/

  21. Baxter, G., Frean, M., Noble, J., Rickerby, M., Smith, H., Visser, M., Melton, H., Tempero, E.: Understanding the shape of Java software. In: Cook, W. (ed.) ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, Portland, OR, U.S.A, October 2006, pp. 397–412 (2006)

    Google Scholar 

  22. Potanin, A., Noble, J., Frean, M., Biddle, R.: Scale-free geometry in OO programs. Commun. ACM 48(5), 99–103 (2005)

    Article  Google Scholar 

  23. Benlarbi, S., Melo, W.L.: Polymorphism measures for early risk prediction. In: ICSE 1999: Proceedings of the 21st international conference on Software engineering, pp. 334–344. IEEE Computer Society Press, Los Alamitos (1999)

    Google Scholar 

  24. Steimann, F., Mayer, P.: Patterns of interface-based programming. Journal of Object Technology 4(5), 75–94 (2005), http://www.jot.fm/issues/issue_2005_07/article1

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Vitek

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tempero, E., Noble, J., Melton, H. (2008). How Do Java Programs Use Inheritance? An Empirical Study of Inheritance in Java Software. In: Vitek, J. (eds) ECOOP 2008 – Object-Oriented Programming. ECOOP 2008. Lecture Notes in Computer Science, vol 5142. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70592-5_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-70592-5_28

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-70591-8

  • Online ISBN: 978-3-540-70592-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics