How bad is your Change Risk Anti-Pattern index?

Measures the C.R.A.P. (Change Risk Anti-Patterns) score. It is designed to analyze and predict the amount of effort, pain, and time required to maintain an existing body of code.

A method with a CRAP score over 30 is considered CRAPpy (i.e., unacceptableoffensive, etc.).

 C.R.A.P.(m) = comp(m)^2 * (1 – cov(m)/100)^3 + comp(m)

Where comp(m) is the cyclomatic complexity of method m, and cov(m) is the test code coverage provided by automated tests.

1 thought on “How bad is your Change Risk Anti-Pattern index?”

  1. Can you please take up one example which has one CRAP score more than 30 and another is less than 30. I would be very helpful if you explain in details and would be very appreciated.

Leave a Reply