Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.sf.alchim.codeplus.spoonchecker;
 
 
 public class EmptyMethodBodyAnalyzer extends AbstractAnalyzer<CtExecutable<?>> {
 
     public void analyze(CtExecutable<?> element) {
        if ((element.getParent(CtClass.class) != null)
                && !element.getModifiers().contains(.)
                && (element.getBody().getStatements().size() == 0)
                && (element.getBody().getDocComment() == null)) {
            report(element"Empty block");
        }
    }
New to GrepCode? Check out our FAQ X