I have introduced some metrics for gauging the overall structure of a
software system. Essentially these metrics involve considering
compilation dependencies transitively. By considering dependency
transitively, as opposed to directly, we can see (from one perspective)
how a class relates to all the other classes in an application.
In this document I show how transitive dependencies have changed between
JUnit versions using Strongly Connected Component (SCC) size and Class
Reachability Set Size (CRSS) distributions.
Figure 1 shows the breakdown of JUnit's classes into SCCs. The
breakdown is shown as a stacked series of bars. The top-most (green) bar
shows the classes that are not involved in any cycles. So for JUnit-2.0
there are 14 classes (=20-6) that do not participate in any cycles, and
there are two SCCs --- one of size 2 and one of size 4. For JUnit-4.1
there are 7 SCCs of sizes 2, 2, 2, 2, 3, 5 and 9; and there are 41 classes
(=66-25) not involved in any cycles.
Figure 1: Classes involved in cycles in consecutive JUnit releases.
So Figure 1 shows us that the size of JUnit is growing, which is pretty
unexciting because most applications grow in size over time as more
features are added. It also shows us that the number of classes involved
in SCCs is growing. The number of classes involved in SCCs is less
concerning than the size of the SCCs that these classes are involved in.
There's a fuller discussion about this type of behaviour in my my paper
Empirical Study of Cycles among Classes in Java".
You might also like to see graphs similar to that of Figure 1 for other
Figure 2 shows the CRSS distributions over time. As JUnit has grown in
size between releases the number of classes that depend on very little
else (1-4 other classes) has also grown. Growth in the left bars is
almost always more desirable than growth in the right bars. The "gaps" in each version's
distribution along the axis labeled CRSS value are almost always due to SCCs.
See my research page (link at the bottom) for an explanation of why this is so.
Figure 2: Distribution of CRSS values for consecutive JUnit releases.
You might also like to see graphs similar to that of Figure 2 for other