Java: Computing Cyclomatic Complexity How to compute McCabe's Cyclomatic Complexity in Java methods. Flow complexity in methods. McCabe proposed a way to measuring flow complexity of a method which basically counts one for each place where the flow changes from a linear flow.