Why don’t metrics always add up?
Shouldn’t Comment Lines + Blank Lines + Code Lines = Total Lines?
And shouldn’t declarative statements and executable statements add up to the total number of statements as well?
That is a common assumption, however, any given line can actually count towards multiple metrics, so the numbers are not necessarily unique.
int deltaChange = 5; //Delta needs a minimum variant of 5
This line is a code line and a comment line, and counts as both. Likewise the statement is both declarative and executable, so would count in each of those metrics.