public boolean isInvalidNode(){
  ASTNode first=fNodes.get(0);
  ASTNode candidate=first.getParent();
  if (candidate == null)   return false;
  if (candidate.getNodeType() == ASTNode.METHOD_DECLARATION)   return true;
  return false;
}

public boolean isInvalidNode ( ) { ASTNode first = fNodes . get ( 0 ) ; ASTNode candidate = first . getParent ( ) ; if ( candidate == null ) return false ; if ( candidate . getNodeType ( ) == ASTNode . METHOD_DECLARATION ) return true ; return false ; }
tests whether the node to be replaced is invalid .
