This function will recursively find any function expression with ID functionId.
If found, return true. Otherwise, return false.

@param expr
@param functionId
@return
774707
private boolean containsFunctionById(int functionId) {
        if (this instanceof AbstractValueExpression) {
            return false;
        }

        List<AbstractExpression> functionsList = findAllFunctionSubexpressions();
        for (AbstractExpression funcExpr: functionsList) {
            assert(funcExpr instanceof FunctionExpression);
            if (((FunctionExpression)funcExpr).hasFunctionId(functionId)) {
                return true;
            }
        }

        return false;
    }
139226
private static boolean functionalMethod(ExpressionTree tree, VisitorState state) {
    Symbol symbol = ASTHelpers.getSymbol(tree);
    return symbol instanceof MethodSymbol
        && ((MethodSymbol) symbol)
            .owner
            .packge()
            .getQualifiedName()
            .contentEquals("java.util.function");
  }
903713
public static Expression id(String id) {
    CodeChunkUtils.checkId(id);
    return Leaf.create(id, /* isCheap= */ true);
  }
726458
@Override
    public List<AbstractExpression> bindingToIndexedExpression(AbstractExpression expr) {
        if (m_originalValue == null || ! m_originalValue.equals(expr)) {
            return null;
        }
        // This parameter's value was matched, so return this as one bound parameter.
        List<AbstractExpression> result = new ArrayList<AbstractExpression>();
        result.add(this);
        return result;
    }
560241
public Expr call(String method, Expr argument1) {
      return new Expr(
        expr + "." + method + "(" + argument1.toSwiftCode() + ")",
        false,
        containsThrow || argument1.containsThrow,
        false);
    }
1212772
public static boolean isFunction( Object obj ) {
      if( obj instanceof String ){
         String str = (String) obj;
         return str.startsWith( FUNCTION_PREFIX ) && RegexpUtils.getMatcher( FUNCTION_PATTERN, true ).matches( str );
      }
      if( obj instanceof JSONFunction ){
         return true;
      }
      return false;
   }
223329
public boolean isFunction(final String variableExpression) {
        if (variableExpression == null || variableExpression.length() == 0) {
            return false;
        }
        
        for (int i = 0; i < functionLibraries.size(); i++) {
            FunctionLibrary lib = (FunctionLibrary)functionLibraries.get(i);
            if (variableExpression.startsWith(lib.getPrefix())) {
                return true;
            }
        }

        return false;
    }
642445
public final EventFilterParser.boolean_expr_return boolean_expr() throws RecognitionException {
        EventFilterParser.boolean_expr_return retval = new EventFilterParser.boolean_expr_return();
        retval.start = input.LT(1);


        CommonTree root_0 = null;

        Token AND3=null;
        EventFilterParser.boolean_factor_return a =null;

        EventFilterParser.boolean_factor_return b =null;


        CommonTree AND3_tree=null;
        RewriteRuleTokenStream stream_AND=new RewriteRuleTokenStream(adaptor,"token AND");
        RewriteRuleSubtreeStream stream_boolean_factor=new RewriteRuleSubtreeStream(adaptor,"rule boolean_factor");
        try {
            // EventFilter.g:107:2: ( (a= boolean_factor -> $a) ( AND b= boolean_factor -> ^( AND $boolean_expr $b) )* )
            // EventFilter.g:107:4: (a= boolean_factor -> $a) ( AND b= boolean_factor -> ^( AND $boolean_expr $b) )*
            {
            // EventFilter.g:107:4: (a= boolean_factor -> $a)
            // EventFilter.g:107:5: a= boolean_factor
            {
            pushFollow(FOLLOW_boolean_factor_in_boolean_expr370);
            a=boolean_factor();

            state._fsp--;

            stream_boolean_factor.add(a.getTree());

            // AST REWRITE
            // elements: a
            // token labels:
            // rule labels: retval, a
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"rule a",a!=null?a.tree:null);

            root_0 = (CommonTree)adaptor.nil();
            // 107:21: -> $a
            {
                adaptor.addChild(root_0, stream_a.nextTree());

            }


            retval.tree = root_0;

            }


            // EventFilter.g:107:27: ( AND b= boolean_factor -> ^( AND $boolean_expr $b) )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==AND) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // EventFilter.g:107:28: AND b= boolean_factor
            	    {
            	    AND3=(Token)match(input,AND,FOLLOW_AND_in_boolean_expr377);
            	    stream_AND.add(AND3);


            	    pushFollow(FOLLOW_boolean_factor_in_boolean_expr381);
            	    b=boolean_factor();

            	    state._fsp--;

            	    stream_boolean_factor.add(b.getTree());

            	    // AST REWRITE
            	    // elements: b, boolean_expr, AND
            	    // token labels:
            	    // rule labels: retval, b
            	    // token list labels:
            	    // rule list labels:
            	    // wildcard labels:
            	    retval.tree = root_0;
            	    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
            	    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"rule b",b!=null?b.tree:null);

            	    root_0 = (CommonTree)adaptor.nil();
            	    // 107:49: -> ^( AND $boolean_expr $b)
            	    {
            	        // EventFilter.g:107:52: ^( AND $boolean_expr $b)
            	        {
            	        CommonTree root_1 = (CommonTree)adaptor.nil();
            	        root_1 = (CommonTree)adaptor.becomeRoot(
            	        new AndTreeNode(stream_AND.nextToken())
            	        , root_1);

            	        adaptor.addChild(root_1, stream_retval.nextTree());

            	        adaptor.addChild(root_1, stream_b.nextTree());

            	        adaptor.addChild(root_0, root_1);
            	        }

            	    }


            	    retval.tree = root_0;

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);


            retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }

        finally {
        	// do for sure before leaving
        }
        return retval;
    }
1155190
@Nullable
    public static Predicate allOf(Collection<Predicate> exprs) {
        Predicate rv = null;
        for (Predicate b : exprs) {
            if (b != null) {
                rv = rv == null ? b : ExpressionUtils.and(rv,b);
            }
        }
        return rv;
    }
340949
private static Node returnedExpression(Node fn) {
    Node expectedBlock = NodeUtil.getFunctionBody(fn);
    if (!expectedBlock.hasOneChild()) {
      return null;
    }

    Node expectedReturn = expectedBlock.getFirstChild();
    if (!expectedReturn.isReturn()) {
      return null;
    }

    if (!expectedReturn.hasOneChild()) {
      return null;
    }

    return expectedReturn.getOnlyChild();
  }
1314787
function isFunctionExpression(node) {
    if (node && node.callee && node.callee.type === 'FunctionExpression') {
        return true;
    }
    return false;
}
109293
public static BooleanExpression anyOf(BooleanExpression... exprs) {
        BooleanExpression rv = null;
        for (BooleanExpression b : exprs) {
            rv = rv == null ? b : rv.or(b);
        }
        return rv;
    }
102782
function isCallbackExpression(node, parentNode) {

            // ensure the parent node exists and is an expression
            if (!parentNode || parentNode.type !== "ExpressionStatement") {
                return false;
            }

            // cb()
            if (parentNode.expression === node) {
                return true;
            }

            // special case for cb && cb() and similar
            if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") {
                if (parentNode.expression.right === node) {
                    return true;
                }
            }

            return false;
        }
162559
function isExpression(node) {
        switch (node.type) {
        case Syntax.AssignmentExpression:
        case Syntax.ArrayExpression:
        case Syntax.ArrayPattern:
        case Syntax.BinaryExpression:
        case Syntax.CallExpression:
        case Syntax.ConditionalExpression:
        case Syntax.ClassExpression:
        case Syntax.ExportBatchSpecifier:
        case Syntax.ExportSpecifier:
        case Syntax.FunctionExpression:
        case Syntax.Identifier:
        case Syntax.ImportDefaultSpecifier:
        case Syntax.ImportNamespaceSpecifier:
        case Syntax.ImportSpecifier:
        case Syntax.Literal:
        case Syntax.LogicalExpression:
        case Syntax.MemberExpression:
        case Syntax.MethodDefinition:
        case Syntax.ModuleSpecifier:
        case Syntax.NewExpression:
        case Syntax.ObjectExpression:
        case Syntax.ObjectPattern:
        case Syntax.Property:
        case Syntax.SequenceExpression:
        case Syntax.ThisExpression:
        case Syntax.UnaryExpression:
        case Syntax.UpdateExpression:
        case Syntax.YieldExpression:
            return true;
        }
        return false;
    }
1309438
protected Expression visitExpression(Expression expr) {
        if (expr == null) {
            return null;
        }

        Expression newExpr = (Expression)expr.accept(this);
        if (expr != newExpr) {
            Type newType = newExpr.getType();

            if (newType == null || !newType.equals(expr.getType())) {
                Iterator<Expression.Conversion> it =
                    expr.getConversionChain().iterator();
                while (it.hasNext()) {
                    Expression.Conversion conv = it.next();
                    newExpr.convertTo
                        (conv.getToType(), conv.isCastPreferred());
                }
            }
        }
        return newExpr;
    }
996774
public static <T> JPQLQuery<T> select(Expression<T> expr) {
        return new JPASubQuery<Void>().select(expr);
    }
554146
public <T> JDOQuery<T> selectFrom(EntityPath<T> expr) {
        return select(expr).from(expr);
    }