Software Engineering Conference, Australian (2009)
Gold Coast, Australia
Apr. 14, 2009 to Apr. 17, 2009
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/ASWEC.2009.19
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.
information hiding, non-private fields, code analysis, empirical study
Ewan Tempero, "How Fields are Used in Java: An Empirical Study", Software Engineering Conference, Australian, vol. 00, no. , pp. 91-100, 2009, doi:10.1109/ASWEC.2009.19