Create an {@code EvalPair}. The "correct" (key) item comes first.
162511
public static <KeyT, TestT> EvalPair<KeyT, TestT> of(
      KeyT key, TestT test) {
    return new EvalPair<KeyT, TestT>(key, test);
  }
47434
public Object eval(Scope scope) {
		if (index == null) {
			return assignVariable(scope);
		} else {
			return assignElement(scope);
		}
	}
517845
private static Selector evalOf(Selector arg) {
    if (arg.getNumIds() > 0)
      return arg;
    return new LiteralImpl(Matching.getEvaluator().eval(arg));
  }
557013
private Object doProperty( boolean toLHS,
        Object obj, CallStack callstack, Interpreter interpreter )
        throws EvalError
    {
        if(obj == Primitive.VOID)
            throw new EvalError(
            "Attempt to access property on undefined variable or class name",
                this, callstack );

        if ( obj instanceof Primitive )
            throw new EvalError("Attempt to access property on a primitive",
                this, callstack );

        Object value = ((SimpleNode)jjtGetChild(0)).eval(
            callstack, interpreter);

        if ( !( value instanceof String ) )
            throw new EvalError(
                "Property expression must be a String or identifier.",
                this, callstack );

        if ( toLHS )
            return new LHS(obj, (String)value);

        try {
            Object val = Reflect.getObjectProperty( obj, (String)value );
            return null == val ?  Primitive.NULL : Primitive.unwrap(val);
        }
        catch (ReflectError e)
        {
            throw new EvalError("No such property: " + value, this, callstack, e);
        }
    }
750817
public static Object evalSpecial(Context cx, Scriptable scope,
                                     Object thisArg, Object[] args,
                                     String filename, int lineNumber)
    {
        if (args.length < 1)
            return Undefined.instance;
        Object x = args[0];
        if (!(x instanceof CharSequence)) {
            if (cx.hasFeature(Context.FEATURE_STRICT_MODE) ||
                cx.hasFeature(Context.FEATURE_STRICT_EVAL))
            {
                throw Context.reportRuntimeError0("msg.eval.nonstring.strict");
            }
            String message = ScriptRuntime.getMessage0("msg.eval.nonstring");
            Context.reportWarning(message);
            return x;
        }
        if (filename == null) {
            int[] linep = new int[1];
            filename = Context.getSourcePositionFromStack(linep);
            if (filename != null) {
                lineNumber = linep[0];
            } else {
                filename = "";
            }
        }
        String sourceName = ScriptRuntime.
            makeUrlForGeneratedScript(true, filename, lineNumber);

        ErrorReporter reporter;
        reporter = DefaultErrorReporter.forEval(cx.getErrorReporter());

        Evaluator evaluator = Context.createInterpreter();
        if (evaluator == null) {
            throw new JavaScriptException("Interpreter not present",
                    filename, lineNumber);
        }

        // Compile with explicit interpreter instance to force interpreter
        // mode.
        Script script = cx.compileString(x.toString(), evaluator,
                                         reporter, sourceName, 1, null);
        evaluator.setEvalScriptFlag(script);
        Callable c = (Callable)script;
        return c.call(cx, scope, (Scriptable)thisArg, ScriptRuntime.emptyArgs);
    }
29174
private SoyValue eval(ExprNode expr, SoyNode node) {

    if (expr == null) {
      throw RenderException.create("Cannot evaluate expression in V1 syntax.")
          .addStackTraceElement(node);
    }

    // Lazily initialize evalVisitor.
    if (evalVisitor == null) {
      evalVisitor =
          evalVisitorFactory.create(
              env,
              cssRenamingMap,
              xidRenamingMap,
              msgBundle,
              debugSoyTemplateInfo,
              pluginInstances);
    }

    try {
      return evalVisitor.exec(expr);
    } catch (RenderException e) {
      // RenderExceptions can be thrown when evaluating lazy transclusions.
      throw RenderException.createFromRenderException(
          "When evaluating \"" + expr.toSourceString() + "\": " + e.getMessage(), e, node);
    } catch (Exception e) {
      throw RenderException.createWithSource(
          "When evaluating \"" + expr.toSourceString() + "\": " + e.getMessage(), e, node);
    }
  }
493249
public Object eval( CallStack callstack, Interpreter interpreter)
        throws EvalError
    {
        Object value = Primitive.VOID;
        try {
            NameSpace namespace = callstack.top();
            BSHType typeNode = getTypeNode();
            Class<?> type = typeNode.getType( callstack, interpreter );

            BSHVariableDeclarator [] bvda = getDeclarators();
            for (int i = 0; i < bvda.length; i++)
            {
                BSHVariableDeclarator dec = bvda[i];

                // Type node is passed down the chain for array initializers
                // which need it under some circumstances
                value = dec.eval( typeNode, modifiers, callstack, interpreter);
                try {
                    LHS lhs = null;
                    if ( namespace.isClass )
                        if ( null != namespace.classInstance )
                            lhs = new LHS(namespace.classInstance,
                                Reflect.resolveJavaField(
                                    namespace.classInstance.getClass(),
                                dec.name, modifiers.hasModifier("static")));
                        else
                            lhs = new LHS(namespace.classStatic,
                                Reflect.resolveJavaField(namespace.classStatic,
                                dec.name, modifiers.hasModifier("static")));

                    if ( null != lhs && null != lhs.field ) {
                        Variable var = new Variable(dec.name, type, lhs);
                        var.modifiers = modifiers;
                        var.setValue(value, Variable.ASSIGNMENT);
                        namespace.setVariableImpl(var);
                    } else {
                        if (interpreter.getStrictJava()
                                && value instanceof Primitive
                                && ((Primitive) value).isNumber())
                            value = Primitive.castNumberStrictJava(type,
                                    ((Primitive) value).numberValue());
                        namespace.setTypedVariable(
                                dec.name, type, value, modifiers );
                    }
                    value = namespace.getVariable(dec.name);
                } catch ( UtilEvalError e ) {
                    throw e.toEvalError( this, callstack );
                }
            }
        } catch ( EvalError e ) {
            e.reThrow( "Typed variable declaration" );
        }
        return value;
    }
477597
public static Object eval(String script, ScriptContext context) throws ScriptRuntimeException {
		try {
			return compile(script).eval(context);
		} catch (ScriptException e) {
			throw new ScriptRuntimeException(e);
		}
	}
423271
@Override
    public int doEndTag() throws JspException {
        if (!scopeSpecified) {
            pageContext.removeAttribute(var);
        } else {
            pageContext.removeAttribute(var, scope);
        }
        return EVAL_PAGE;
    }
385815
public int doStartTag() throws JspException
    {
        Object val = evaluateDataSource();
        _defaultSelections = (List) evaluateDefaultValue();

        // if there were expression errors report them
        if (hasErrors())
            return SKIP_BODY;

        buildMatch(val);
        if (hasErrors())
            return SKIP_BODY;


        _formatters = new ArrayList();
        _optionList = new ArrayList();

        // Walk the options data source
        _dynamicOptions = evaluateOptionsDataSource();
        if (_repeater) {
            _repCurStage = _order[0];
            boolean valid = doRepeaterAfterBody();
            if (!valid)
                return SKIP_BODY;
            DataAccessProviderStack.addDataAccessProvider(this, pageContext);
        }

        // Continue processing this page
        return EVAL_BODY_BUFFERED;
    }
582238
public Object eval( Reader in ) throws EvalError
    {
        return eval( in, globalNameSpace, null == sourceFileInfo ? "eval stream" : sourceFileInfo );
    }
864788
private synchronized void onEvaluatorDone(final EvaluatorStatusPOJO message) {

    assert message.getState() == State.DONE;

    LOG.log(Level.FINEST, "Evaluator {0} done.", getId());

    // Send an ACK to the Evaluator.
    sendEvaluatorControlMessage(
        EvaluatorRuntimeProtocol.EvaluatorControlProto.newBuilder()
            .setTimestamp(System.currentTimeMillis())
            .setIdentifier(getId())
            .setDoneEvaluator(EvaluatorRuntimeProtocol.DoneEvaluatorProto.newBuilder().build())
            .build());

    this.stateManager.setDone();
    this.messageDispatcher.onEvaluatorCompleted(new CompletedEvaluatorImpl(this.evaluatorId));

    this.close();
  }
1365981
public synchronized boolean onRecoverEvaluator(final String evaluatorId) {
    if (getStateOfPreviousEvaluator(evaluatorId).isFailedOrNotExpected()) {
      final String errMsg = "Evaluator with evaluator ID " + evaluatorId + " not expected to be alive.";
      LOG.log(Level.SEVERE, errMsg);
      throw new DriverFatalRuntimeException(errMsg);
    }

    if (getStateOfPreviousEvaluator(evaluatorId) != EvaluatorRestartState.EXPECTED) {
      LOG.log(Level.WARNING, "Evaluator with evaluator ID " + evaluatorId + " added to the set" +
          " of recovered evaluators more than once. Ignoring second add...");
      return false;
    }

    // set the status for this evaluator ID to be reported.
    setEvaluatorReported(evaluatorId);

    if (haveAllExpectedEvaluatorsReported()) {
      onDriverRestartCompleted(false);
    }

    return true;
  }
3757
@Override
	protected void initEvalParams() {
		_sParam = new BackwardEvalParam(_acronym._shortForm);
		_lParam = new BackwardEvalParam(_acronym._longForm);
		_partialWordParam = null;
	}
269474
def create(self, key, value=None, dir=False, ttl=None, timeout=None):
        """"""
        return self.adapter.set(key, value, dir=dir, ttl=ttl,
                                prev_exist=False, timeout=timeout)
1316695
public ExecutionContext createEvalExecutionContext(JSProgram eval, boolean direct) {
        // 10.4.2 (with caller)
        //System.err.println( "CREATE EVAL EXEC CONTEXT" );
        ExecutionContext context = null;

        Object evalThisBinding = null;
        LexicalEnvironment evalLexEnv = null;
        LexicalEnvironment evalVarEnv = null;

        if (!direct) {
            evalThisBinding = getGlobalContext().getObject();
            evalLexEnv = LexicalEnvironment.newGlobalEnvironment(getGlobalContext().getObject());
            evalVarEnv = LexicalEnvironment.newGlobalEnvironment(getGlobalContext().getObject());
        } else {
            evalThisBinding = this.thisBinding;
            evalLexEnv = this.getLexicalEnvironment();
            evalVarEnv = this.getVariableEnvironment();
        }

        if (eval.isStrict()) {
            LexicalEnvironment strictVarEnv = LexicalEnvironment.newDeclarativeEnvironment(this.getLexicalEnvironment());
            evalLexEnv = strictVarEnv;
            evalVarEnv = strictVarEnv;
        }

        context = new ExecutionContext(this.runtime, this, evalLexEnv, evalVarEnv, evalThisBinding, eval.isStrict());
        context.source = eval.getSource();
        context.fileName = eval.getFileName();
        //System.err.println( context.fileName + " >> " + context.source );
        context.performFunctionDeclarationBindings(eval, true);
        context.performVariableDeclarationBindings(eval, true);
        return context;
    }
1056580
public Object eval(String script) {
//        // use Java's ScriptEngine at the moment
//        ScriptEngineManager manager = new ScriptEngineManager();
//        ScriptEngine jsEngine = manager.getEngineByName("JavaScript");
//        try {
//            return jsEngine.eval(script);
//        } catch (ScriptException e) {
//            throw new RuntimeException(e);
//        }
        return eval(script, Collections.<String, Object>emptyMap());
    }