This metric measures the number of lines of code each method has. If methods have too many lines they may be difficult to understand and hence a source of defects. It is also an indication that methods may be trying to do too much.

Extract logical parts of long methods into auxiliary methods. As a guideline, each method should be able to be read on screen without scrolling.

  • Martin Fowler. Refactoring. Addison-Wesley. 1999.