public static String getMethodName(Expression invocation) {
    if (invocation instanceof MethodCallExpression) {
      return ((MethodCallExpression) invocation).getMethodAsString();
    }
    if (invocation instanceof StaticMethodCallExpression) {
      return ((StaticMethodCallExpression) invocation).getMethod();
    }
    return null;
  }
Tells if the source position for the given AST node is plausible.
Does not imply that the source position is correct.

@param node an AST node
@return <tt>true</tt> iff the AST node has a plausible source position
spock-core/src/main/java/org/spockframework/compiler/AstUtil.java