Distribution of Complexity in JUnit
This evidence suggests that the Cyclomatic Complexity per method in this version of JUnit is distributed according to a discrete power–law distribution with shape parameter ρ ≈ 1.43
This chart shows the empirical probability of a given complexity in blue and that from the maximum–likelihood fitted power–law distribution in red. Solid lines show where the fitted distribution underestimates the probability of methods with a certain complexity occurring, dashed lines where it overestimates.
Note that both scales are logarithmic.
Other long-tailed distributions (e.g. log-normal) can be fitted onto this data, but the hypothesis that they represent data is rejected at the 5% level.