TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  CodeSize2Checked automatically with code checker

Synopsis:Avoid really long methods
Language:Java
Severity Level:2
Category:CodeSize


Description:
Violations of this rule usually indicate that the method is doing too much (containing more than 100 statements). Try to reduce the method size by creating helper methods and removing any copy/pasted code.
public class Foo {
 public void doSomething() {
  System.out.println("Hello world!");
  System.out.println("Hello world!");
  // 98 copies omitted for brevity.
 }
}


Literature References:
Google Android Guidelines