Over a million developers have joined DZone.

1942 Classes: Statistics About Spring 2.5

DZone's Guide to

1942 Classes: Statistics About Spring 2.5

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

Frameworks are growing with every release. Classes are changed, removed and added. In this series I zoom in on some well known projects and analyze their class names with completely meaningless statistics. First: Spring 2.5.

To get these statistics, I wrote a script that analyzed all classes. They get chopped up on word boundaries, so for ContextAwareFactoryBean the words Context, Aware, Factory and Bean are counted. From the output I generated a Class Cloud.

Spring is a framework of Factories, Beans, and Exceptions

There are 1942 classes currently in Spring. Of those, 213 classes contain the word Factory. Even more classes contain the word Bean. Spring is clearly a framework that loves factories and beans. There is even a FactoryBean class.

Another high score partial class name is the Exception. Exactly 197 classes have that in their class name. From the humble BindException to the fine-grained JdbcUpdateAffectedIncorrectNumberOfRowsException.

Class Cloud (click to enlarge)

Spring 2.5 statistics Class Cloud

Top 10 of partial class names

  • Bean: 239
  • Factory: 213
  • Exception: 197
  • Abstract: 158
  • Context: 112
  • Source: 97
  • Utils: 89
  • Transaction: 85
  • Resolver: 79
  • Request: 78

Longest class name

The grand prize goes to two classes: AbstractInterruptibleBatchPreparedStatementSetter and AbstractTransactionalDataSourceSpringContextTests

Both have a length of 49 characters!

Stay tuned for more useless statistics for other well known projects! If you have suggestions for which projects you want to see, please let me know in the comments!

From http://stuq.nl

Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}