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

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.

[1]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[2]  Michael Stepp,et al.  An empirical study of Java bytecode programs , 2007, Softw. Pract. Exp..

[3]  Victor R. Basili,et al.  A Validation of Object-Oriented Design Metrics as Quality Indicators , 1996, IEEE Trans. Software Eng..

[4]  Michelle Cartwright,et al.  An empirical view of inheritance , 1998, Inf. Softw. Technol..

[5]  Rachel Harrison,et al.  Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems , 2000, J. Syst. Softw..

[6]  John W. Daly,et al.  Evaluating inheritance depth on the maintainability of object-oriented software , 2004, Empirical Software Engineering.

[7]  Brian Foote,et al.  Designing Reusable Classes , 2001 .

[8]  Shari Lawrence Pfleeger,et al.  Towards a Framework for Software Measurement Validation , 1995, IEEE Trans. Software Eng..

[9]  Friedrich Steimann,et al.  Patterns of Interface-Based Programming , 2005, J. Object Technol..

[10]  Ewan D. Tempero,et al.  Understanding the shape of Java software , 2006, OOPSLA '06.

[11]  D. Mancl,et al.  A study of the impact of C++ on software maintenance , 1990, Proceedings. Conference on Software Maintenance 1990.

[12]  Christopher G. Lasater,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[13]  Chris F. Kemerer,et al.  Towards a metrics suite for object oriented design , 2017, OOPSLA '91.

[14]  Ivar Jacobson,et al.  Unified Modeling Language Reference Manual, The (2nd Edition) , 2004 .

[15]  Cyril S. Ku,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[16]  Ewan D. Tempero,et al.  An empirical study of cycles among classes in Java , 2007, Empirical Software Engineering.

[17]  James Noble,et al.  Scale-free geometry in OO programs , 2005, CACM.

[18]  Bruce D. Shriver,et al.  Research Directions in Object-Oriented Programming , 1987 .

[19]  Walcélio L. Melo,et al.  Polymorphism measures for early risk prediction , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[20]  Witold Pedrycz,et al.  An Empirical Exploration of the Distributions of the Chidamber and Kemerer Object-Oriented Metrics Suite , 2004, Empirical Software Engineering.

[21]  Bertrand Meyer,et al.  Reusability: The Case for Object-Oriented Design , 1987, IEEE Software.

[22]  David P. Darcy,et al.  Managerial Use of Metrics for Object-Oriented Software: An Exploratory Analysis , 1998, IEEE Trans. Software Eng..

[23]  Antero Taivalsaari,et al.  On the notion of inheritance , 1996, CSUR.

[24]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[25]  Lionel C. Briand,et al.  A comprehensive empirical validation of design measures for object-oriented systems , 1998, Proceedings Fifth International Software Metrics Symposium. Metrics (Cat. No.98TB100262).