public static boolean isInvocationWithImplicitThis(Expression invocation) {
    if (invocation instanceof PropertyExpression) {
      return ((PropertyExpression) invocation).isImplicitThis();
    }
    if (invocation instanceof MethodCallExpression) {
      return ((MethodCallExpression) invocation).isImplicitThis();
    }
    return false;
  }
Returns a list of statements of the given method. Modifications to the returned list
will affect the method's statements.

@param method a method (node)
@return a list of statements of the given method
spock-core/src/main/java/org/spockframework/compiler/AstUtil.java