An Empirical Study of Class Sizes for Large Java Systems

  • Authors:
  • Hongyu Zhang;Hee Beng Kuan Tan

  • Affiliations:
  • -;-

  • Venue:
  • APSEC '07 Proceedings of the 14th Asia-Pacific Software Engineering Conference
  • Year:
  • 2007

Quantified Score

Hi-index 0.01

Visualization

Abstract

We perform an empirical study of class sizes (in terms of Lines of Code) on a number of large Java software systems, and discover an interesting pattern - that many classes have only small sizes whereas a few classes have large size. We call this phenomenon the small class phenomenon. Further analysis shows that the class sizes follow the lognormal distribution. Having understood the distribution of class sizes, we then derive a general size estimation model, which reveals the relationship between the size of a large Java system and the number of classes the system has. In this paper, we also show that the adoption of objectorientation is a possible cause of the small class phenomenon. We believe our study reveals the regularity that emerges from large-scale object-oriented software construction, and hope our research can contribute to a deep understanding of computer programming.