How Fields are Used in Java: An Empirical Study

The information hiding principle is generally accepted as one that if followed leads to higher quality software than if it is not followed. To follow the information hiding principle in object-oriented designs the advice is to avoid non-private fields. There is, however, little empirical evidence as to whether or not this advice is being followed. This paper presents the results of an empirical study of 100 open-source Java applications to determine to what degree non-private fields are declared, and to what extend they are used. The study indicates that it is not uncommon (albeit not that terribly common) to declare non-private fields, but then not take advantage of that access.

[1]  Arthur J. Riel,et al.  Object-Oriented Design Heuristics , 1996 .

[2]  David Lorge Parnas,et al.  Information Distribution Aspects of Design Methodology , 1971, IFIP Congress.

[3]  Ewan D. Tempero An Empirical Study of Unused Design Decisions in Open Source Java Software , 2008, 2008 15th Asia-Pacific Software Engineering Conference.

[4]  Guy L. Steele,et al.  Java(TM) Language Specification , 2005 .

[5]  Lionel C. Briand,et al.  Exploring the relationships between design measures and software quality in object-oriented systems , 2000, J. Syst. Softw..

[6]  Edward V. Berard,et al.  Essays on object-oriented software engineering , 1992 .

[7]  Fernando Brito e Abreu,et al.  Evaluating the impact of object-oriented design on software quality , 1996, Proceedings of the 3rd International Software Metrics Symposium.

[8]  Mark Lorenz,et al.  Object-oriented software metrics - a practical guide , 1994 .

[9]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[10]  Stephen R. Schach,et al.  Quantitatively measuring object-oriented couplings , 2008, Software Quality Journal.

[11]  Edward V. Berard,et al.  Essays on object-oriented software engineering (vol. 1) , 1993 .

[12]  Aaas News,et al.  Book Reviews , 1893, Buffalo Medical and Surgical Journal.

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

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

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

[16]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .