In a column titled "Debunking Cyclomatic Complexity" by Andrew Binstock, in the Software Development Times, we read the following:
"... cyclometric complexity does not correlate directly to defect probability.
... routines with CCNs of 1 through 25 did not follow the expected result that greater CCN correlates to greater probability of defects. Rather, it found that for CCNs of 1 through 11, the higher the CCN the lower the bug probability.
... The majority of routines written in object-oriented languages today ... have CCNs in this range. This means that for most code you write, CCN does not tell you anything useful about the likelihood of your code’s quality. (Above 25, CCN does correlate to greater bug probability.)"
No comments:
Post a Comment