Number Of Statements

This metric represents the number of statements in a method. I consider it a more robust measure than Lines of Code since the latter is fragile with respect to different formatting conventions. However, as in the case of Lines of Code, a large number of statements is not in itself a bad thing, it does suggest the possibility of extracting methods which gives related groups of statements a name and therefore increases the level of abstraction and deepens semantics.

Statements counted by this metric are: break, continue, do, explicit constructor call, explicit super constructor call, for, if, return, switch, throw, try, catch, finally, while, assignments. method calls, pre/post increment/decrement. In addition, local class definitions will cause the enclosing method's statement count to be increased by the total statement count of the local class.


This plugin is provided by State Of Flow