Convenient method in case lambda expression is ambiguous for the compiler.
431322
public static <T1, T2, R> BiFunction biFunc(final BiFunction<T1, T2, R> lambda) {
		return lambda;
	}
1026403
private static void populateLambdaArgs(Class<?> functionalInterface, final Class<?> lambdaType,
      Map<TypeVariable<?>, Type> map) {
    if (RESOLVES_LAMBDAS) {
      // Find SAM
      for (Method m : functionalInterface.getMethods()) {
        if (!isDefaultMethod(m) && !Modifier.isStatic(m.getModifiers()) && !m.isBridge()) {
          // Skip methods that override Object.class
          Method objectMethod = OBJECT_METHODS.get(m.getName());
          if (objectMethod != null && Arrays.equals(m.getTypeParameters(), objectMethod.getTypeParameters()))
            continue;

          // Get functional interface's type params
          Type returnTypeVar = m.getGenericReturnType();
          Type[] paramTypeVars = m.getGenericParameterTypes();

          Member member = getMemberRef(lambdaType);
          if (member == null)
            return;

          // Populate return type argument
          if (returnTypeVar instanceof TypeVariable) {
            Class<?> returnType = member instanceof Method ? ((Method) member).getReturnType()
                : ((Constructor<?>) member).getDeclaringClass();
            returnType = wrapPrimitives(returnType);
            if (!returnType.equals(Void.class))
              map.put((TypeVariable<?>) returnTypeVar, returnType);
          }

          Class<?>[] arguments = member instanceof Method ? ((Method) member).getParameterTypes()
              : ((Constructor<?>) member).getParameterTypes();

          // Populate object type from arbitrary object method reference
          int paramOffset = 0;
          if (paramTypeVars.length > 0 && paramTypeVars[0] instanceof TypeVariable
              && paramTypeVars.length == arguments.length + 1) {
            Class<?> instanceType = member.getDeclaringClass();
            map.put((TypeVariable<?>) paramTypeVars[0], instanceType);
            paramOffset = 1;
          }

          // Handle additional arguments that are captured from the lambda's enclosing scope
          int argOffset = 0;
          if (paramTypeVars.length < arguments.length) {
            argOffset = arguments.length - paramTypeVars.length;
          }

          // Populate type arguments
          for (int i = 0; i + argOffset < arguments.length; i++) {
            if (paramTypeVars[i] instanceof TypeVariable)
              map.put((TypeVariable<?>) paramTypeVars[i + paramOffset], wrapPrimitives(arguments[i + argOffset]));
          }

          return;
        }
      }
    }
  }
1240143
public CompilationUnitDeclaration resolve(
            ICompilationUnit sourceUnit,
            boolean verifyMethods,
            boolean analyzeCode,
            boolean generateCode) {

        return resolve(
            null,
            sourceUnit,
            verifyMethods,
            analyzeCode,
            generateCode);
    }
299637
public BytecodeNode compile(RowExpression rowExpression, Scope scope, Optional<Variable> outputBlockVariable, Optional<Class> lambdaInterface)
    {
        return rowExpression.accept(new Visitor(), new Context(scope, outputBlockVariable, lambdaInterface));
    }
118548
public final void conditionalAndExpression() throws RecognitionException {
		int conditionalAndExpression_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 112) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:5: ( inclusiveOrExpression ( '&&' inclusiveOrExpression )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:9: inclusiveOrExpression ( '&&' inclusiveOrExpression )*
			{
			pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression5102);
			inclusiveOrExpression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:31: ( '&&' inclusiveOrExpression )*
			loop144:
			while (true) {
				int alt144=2;
				int LA144_0 = input.LA(1);
				if ( (LA144_0==33) ) {
					alt144=1;
				}

				switch (alt144) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:33: '&&' inclusiveOrExpression
					{
					match(input,33,FOLLOW_33_in_conditionalAndExpression5106); if (state.failed) return;
					pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression5108);
					inclusiveOrExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop144;
				}
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 112, conditionalAndExpression_StartIndex); }

		}
	}
171547
private void handleLongOptionWithoutEqual(String token) throws OptionParserException {
        List<String> matchingOpts = getMatchingLongOptions(token);
        if (matchingOpts.isEmpty()) {
            handleUnknownToken(currentToken);
        } else if (matchingOpts.size() > 1 && !options.hasLongOption(token)) {
            throw new AmbiguousOptionException(token, matchingOpts);
        } else {
            String key = (options.hasLongOption(token) ? token : matchingOpts.get(0));
            handleOption(options.getOption(key));
        }
    }
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;
    }
1235774
private ClassNode checkForTargetType(final Expression expr, final ClassNode type) {
        BinaryExpression enclosingBinaryExpression = typeCheckingContext.getEnclosingBinaryExpression();
        if (enclosingBinaryExpression instanceof DeclarationExpression
                && isEmptyCollection(expr) && isAssignment(enclosingBinaryExpression.getOperation().getType())) {
            VariableExpression target = (VariableExpression) enclosingBinaryExpression.getLeftExpression();
            return adjustForTargetType(target.getType(), type);
        }
        if (currentField != null) {
            return adjustForTargetType(currentField.getType(), type);
        }
        if (currentProperty != null) {
            return adjustForTargetType(currentProperty.getType(), type);
        }
        MethodNode enclosingMethod = typeCheckingContext.getEnclosingMethod();
        if (enclosingMethod != null) {
            return adjustForTargetType(enclosingMethod.getReturnType(), type);
        }
        return type;
    }
334969
private ParseTree parseMemberExpressionNoNew() {
    SourcePosition start = getTreeStartLocation();
    ParseTree operand;
    if (peekAsyncFunctionStart()) {
      operand = parseAsyncFunctionExpression();
    } else if (peekFunction()) {
      operand = parseFunctionExpression();
    } else {
      operand = parsePrimaryExpression();
    }
    while (peekMemberExpressionSuffix()) {
      switch (peekType()) {
        case OPEN_SQUARE:
          eat(TokenType.OPEN_SQUARE);
          ParseTree member = parseExpression();
          eat(TokenType.CLOSE_SQUARE);
          operand = new MemberLookupExpressionTree(
              getTreeLocation(start), operand, member);
          break;
        case PERIOD:
          eat(TokenType.PERIOD);
          IdentifierToken id = eatIdOrKeywordAsId();
          operand = new MemberExpressionTree(getTreeLocation(start), operand, id);
          break;
        case NO_SUBSTITUTION_TEMPLATE:
        case TEMPLATE_HEAD:
          operand = parseTemplateLiteral(operand);
          break;
        default:
          throw new RuntimeException("unreachable");
      }
    }
    return operand;
  }
1047819
def accept_operator(self, precedence):
        """"""
        match = grammar.infix(self.tokens)
        if not match:
            return

        if match.operator.precedence < precedence:
            return

        # The next thing is an operator that we want. Now match it for real.
        return self.tokens.accept(grammar.infix)
1138599
private void unbox(Expression expr, PrimitiveType primitiveType) {
    TypeElement boxedClass = findBoxedSuperclass(expr.getTypeMirror());
    if (primitiveType == null && boxedClass != null) {
      primitiveType = typeUtil.unboxedType(boxedClass.asType());
    }
    if (primitiveType == null) {
      return;
    }
    ExecutableElement valueMethod = ElementUtil.findMethod(
        boxedClass, TypeUtil.getName(primitiveType) + VALUE_METHOD);
    assert valueMethod != null : "could not find value method for " + boxedClass;
    MethodInvocation invocation = new MethodInvocation(new ExecutablePair(valueMethod), null);
    expr.replaceWith(invocation);
    invocation.setExpression(expr);
  }
842147
private boolean isValidTreeType(Tree t) {
    if (t instanceof LambdaExpressionTree) {
      return true;
    }
    if (t instanceof ClassTree) {
      NestingKind nestingKind = ASTHelpers.getSymbol((ClassTree) t).getNestingKind();
      return nestingKind.equals(NestingKind.ANONYMOUS) || nestingKind.equals(NestingKind.LOCAL);
    }
    return false;
  }
904941
@Builder(builderMethodName = "awaitCondition",  buildMethodName = "await")
  private static boolean evaluateConditionUntilTrue(Callable<Boolean> callable, Double alpha, Integer maxRetries,
      Long maxWait, Long maxDelay, Long initialDelay) throws ExecutionException, InterruptedException {
    ExponentialBackoff exponentialBackoff = new ExponentialBackoff(alpha, maxRetries, maxWait, maxDelay, initialDelay);
    while (true) {
      try {
        if (callable.call()) {
          return true;
        }
      } catch (Throwable t) {
        throw new ExecutionException(t);
      }
      if (!exponentialBackoff.awaitNextRetryIfAvailable()) {
        return false;
      }
    }
  }
1232409
final TypeCheck makeTypeCheck(AbstractCompiler compiler) {
    return new TypeCheck(
            compiler,
            compiler.getReverseAbstractInterpreter(),
            compiler.getTypeRegistry(),
            topScope,
            typedScopeCreator)
        .reportUnknownTypes(options.enables(DiagnosticGroup.forType(TypeCheck.UNKNOWN_EXPR_TYPE)))
        .reportMissingProperties(
            !options.disables(DiagnosticGroup.forType(TypeCheck.INEXISTENT_PROPERTY)));
  }
452813
static JbcSrcJavaValue of(Expression expr, Method method, JbcSrcValueErrorReporter reporter) {
    checkNotNull(method);
    if (expr instanceof SoyExpression) {
      return new JbcSrcJavaValue(
          expr,
          method,
          /* allowedType= */ ((SoyExpression) expr).soyType(),
          /* constantNull= */ false,
          /* error= */ false,
          reporter);
    }
    return new JbcSrcJavaValue(
        expr,
        method,
        /* allowedType= */ null,
        /* constantNull= */ false,
        /* error= */ false,
        reporter);
  }
259869
private static boolean isCompilationDisabledCondition(Expression condition) {
        Object conditionValue = condition.accept(new ConditionalCompilationConditionEvaluator(), null);
        return Boolean.FALSE.equals(conditionValue);
    }
1310955
function narrowType(type, expr, assumeTrue) {
                switch (expr.kind) {
                    case 69 /* Identifier */:
                    case 97 /* ThisKeyword */:
                    case 172 /* PropertyAccessExpression */:
                        return narrowTypeByTruthiness(type, expr, assumeTrue);
                    case 174 /* CallExpression */:
                        return narrowTypeByTypePredicate(type, expr, assumeTrue);
                    case 178 /* ParenthesizedExpression */:
                        return narrowType(type, expr.expression, assumeTrue);
                    case 187 /* BinaryExpression */:
                        return narrowTypeByBinaryExpression(type, expr, assumeTrue);
                    case 185 /* PrefixUnaryExpression */:
                        if (expr.operator === 49 /* ExclamationToken */) {
                            return narrowType(type, expr.operand, !assumeTrue);
                        }
                        break;
                }
                return type;
            }