Now, We have a free version and an Enterprise Solution too

dev \ efor blog

download now

Correlation between Cyclomatic Complexity and Source Lines of Code

Hello there,

As you know, after we released dev\efor, now the development phase is more transperent for us so that we can find out about correlations between code metrics and make better estimates with efforts spent for particular projects…

Since this is our aim, we’d like to share some correlations we find out in terms of trends for code metrics…

This should be obvious, but i’d like to show you with real project datas…

Correlation between Cyclomatic Complexity and Source Lines of Code we found out is straightforward… Let me show you some trends…

This chart shows the trend of source lines of code for GatherWorkItems Project

Trend of Cyclomatic Complexity for ChatherWorkItems Project

The similarity of trends are obvious… The propotion between SLOC vs CC is varies between 3 to 3.5.. the avarage value is 3.3

Let’s see another example..

This chart shows the trend of Lines of Code for Project codartHomeMVC

Trend of Cyclomatic Complexity for codartHomeMVC Project

Still, similarity of trends are obvious.. But this time, the propotion between SLOC vs CC is now varies between 1.2 to 1.64… The avarage value is roughly 1.6

You might think why that peak happens, that is because at that point, we used a code generation tool..
(Oh, did i mention you can find out your copy&paste`s easily by identifying peaks ? , and don’t forget, copy&paste is a design error ;) )

So, Why these values matter ?

If you can gaze the trend, common sense will tell you about how much actual development effort you might spend for development or testing efforts based on these trends…

What about your trends ? Do they correlate with eachother ?

One Response to “Correlation between Cyclomatic Complexity and Source Lines of Code”

  • DotNetShoutout Says:

    dev \ efor team blog » Blog Archive » Correlation between Cyclomatic Complexity and Source Lines of Code…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

Leave a Reply