Jtest logo




Contents  Previous  Next  Index

METRICS.TCC


Cyclomatic Complexity

Description

This metric measures each method's cyclomatic complexity by measuring the number of "while", "for", "if", and "switch" statements in a method.

Cyclomatic complexity measures method complexity.

Studies have found that methods with cyclomatic complexity higher than 10 are more error-prone than methods with lower cyclomatic complexity.

By default, Jtest reports an error if this metric's value is not between 0 and 10.

Note: This rule does not test abstract methods, native methods, or any methods that are declared in the interface.

Reference

Grady, Robert B. Practical Software Metrics For Project Management and Process Improvement. Prentice Hall P T R, 1992, pp.16 - 18.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft