There are myriad code metrics available to measure attributes of code, such as complexity, coupling, and length, but few are arguably useful. In fact, as I’ve stated before, Cyclomatic complexity is the most applicable metric out there for accurately determining risk.
Recently, a few smart individuals married Cyclomatic complexity with code coverage yielding an impressively helpful metric. They’ve dubbed the metric C.R.A.P and while you may shudder at its name, its accuracy will bring goose-bumps.
If you want to learn more, have a listen to JavaWorld’s podcast entitled “Alberto Savoia talks shop about C.R.A.P.“– plus, the guy asking Mr. Savoia all the questions (and chortling a lot) is me!

October 30th, 2007 at 7:00 pm
Hi,
Clover2 provides you with a visualization of cyclomatic complexity versus code coverage. The ‘Project Risks’ coverage cloud displays each class in a single view - the bigger and redder the class, the more complex and less covered it is.
Here is a sample report for the PMD project:
http://downloads.atlassian.com/software/clover/samples/index_project_risks.html
More information on Clover2’s coverage clouds is here: http://confluence.atlassian.com/x/sIhEB .
Cheers,
Nick
November 14th, 2007 at 3:20 am
Hi Glover,
I see it as a good sign to begin with. Along with CC, we also need to look at some of the Code Design Metrics to see weather it’s CRAP or not.
Do check my views on C.R.A.P here
http://venkatreddy.in/2007/10/22/crap4j-for-java-code-quality/
Cheers,
Venkat.