test_class.declarator: logger = LoggerFactory.getLogger(GremlinGroovyScriptEngineTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(GremlinGroovyScriptEngineTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java
test_class.identifier: GremlinGroovyScriptEngineTest
test_case.body: @Test
      public void shouldAllowVariableReuseAcrossThreads() throws Exception {
          final BasicThreadFactory testingThreadFactory = new BasicThreadFactory.Builder().namingPattern("test-gremlin-scriptengine-%d").build();
          final ExecutorService service = Executors.newFixedThreadPool(8, testingThreadFactory);
          final GremlinGroovyScriptEngine scriptEngine = new GremlinGroovyScriptEngine();
  
          final AtomicBoolean failed = new AtomicBoolean(false);
          final int max = 512;
          final List<Pair<Integer, List<Integer>>> futures = Collections.synchronizedList(new ArrayList<>(max));
          IntStream.range(0, max).forEach(i -> {
              final int yValue = i * 2;
              final int zValue = i * -1;
              final Bindings b = new SimpleBindings();
              b.put("x", i);
              b.put("y", yValue);
  
              final String script = "z=" + zValue + ";[x,y,z]";
              try {
                  service.submit(() -> {
                      try {
                          final List<Integer> result = (List<Integer>) scriptEngine.eval(script, b);
                          futures.add(Pair.with(i, result));
                      } catch (Exception ex) {
                          failed.set(true);
                      }
                  });
              } catch (Exception ex) {
                  throw new RuntimeException(ex);
              }
          });
  
          service.shutdown();
          assertThat(service.awaitTermination(120000, TimeUnit.MILLISECONDS), is(true));
  
          // likely a concurrency exception if it occurs - and if it does then we've messed up because that's what this
          // test is partially designed to protected against.
          assertThat(failed.get(), is(false));
          assertEquals(max, futures.size());
          futures.forEach(t -> {
              assertEquals(t.getValue0(), t.getValue1().get(0));
              assertEquals(t.getValue0() * 2, t.getValue1().get(1).intValue());
              assertEquals(t.getValue0() * -1, t.getValue1().get(2).intValue());
          });
      }
test_case.class_method_signature: GremlinGroovyScriptEngineTest.shouldAllowVariableReuseAcrossThreads()
test_case.full_signature: @Test public void shouldAllowVariableReuseAcrossThreads()
test_case.identifier: shouldAllowVariableReuseAcrossThreads
test_case.invocations: build namingPattern newFixedThreadPool synchronizedList forEach range put put submit eval add with set shutdown assertThat awaitTermination is assertThat get is assertEquals size forEach assertEquals getValue0 get getValue1 assertEquals getValue0 intValue get getValue1 assertEquals getValue0 intValue get getValue1
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldAllowVariableReuseAcrossThreads()
focal_class.declarator: COMPILE_OPTIONS_VAR_TYPES = "sandbox.bindings"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMPILE_OPTIONS_VAR_TYPES = "sandbox.bindings";
focal_class.type: String
focal_class.var_name: COMPILE_OPTIONS_VAR_TYPES
focal_class.declarator: KEY_REFERENCE_TYPE = "#jsr223.groovy.engine.keep.globals"
focal_class.modifier: public static final
focal_class.original_string: public static final String KEY_REFERENCE_TYPE = "#jsr223.groovy.engine.keep.globals";
focal_class.type: String
focal_class.var_name: KEY_REFERENCE_TYPE
focal_class.declarator: REFERENCE_TYPE_PHANTOM = "phantom"
focal_class.modifier: public static final
focal_class.original_string: public static final String REFERENCE_TYPE_PHANTOM = "phantom";
focal_class.type: String
focal_class.var_name: REFERENCE_TYPE_PHANTOM
focal_class.declarator: REFERENCE_TYPE_WEAK = "weak"
focal_class.modifier: public static final
focal_class.original_string: public static final String REFERENCE_TYPE_WEAK = "weak";
focal_class.type: String
focal_class.var_name: REFERENCE_TYPE_WEAK
focal_class.declarator: REFERENCE_TYPE_SOFT = "soft"
focal_class.modifier: public static final
focal_class.original_string: public static final String REFERENCE_TYPE_SOFT = "soft";
focal_class.type: String
focal_class.var_name: REFERENCE_TYPE_SOFT
focal_class.declarator: REFERENCE_TYPE_HARD = "hard"
focal_class.modifier: public static final
focal_class.original_string: public static final String REFERENCE_TYPE_HARD = "hard";
focal_class.type: String
focal_class.var_name: REFERENCE_TYPE_HARD
focal_class.declarator: COLLECTED_BOUND_VARS_MAP_VARNAME = "gremlin_script_engine_collected_boundvars"
focal_class.modifier: public static final
focal_class.original_string: public static final String COLLECTED_BOUND_VARS_MAP_VARNAME = "gremlin_script_engine_collected_boundvars";
focal_class.type: String
focal_class.var_name: COLLECTED_BOUND_VARS_MAP_VARNAME
focal_class.declarator: patternImportStatic = Pattern.compile("\\Aimport\\sstatic.*")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern patternImportStatic = Pattern.compile("\\Aimport\\sstatic.*");
focal_class.type: Pattern
focal_class.var_name: patternImportStatic
focal_class.declarator: COMPILE_OPTIONS = new ThreadLocal<Map<String, Object>>(){
          @Override
          protected Map<String, Object> initialValue() {
              return new HashMap<>();
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final ThreadLocal<Map<String, Object>> COMPILE_OPTIONS = new ThreadLocal<Map<String, Object>>(){
          @Override
          protected Map<String, Object> initialValue() {
              return new HashMap<>();
          }
      };
focal_class.type: ThreadLocal<Map<String, Object>>
focal_class.var_name: COMPILE_OPTIONS
focal_class.declarator: classMap = new ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle())
focal_class.modifier: private
focal_class.original_string: private ManagedConcurrentValueMap<String, Class> classMap = new ManagedConcurrentValueMap<>(ReferenceBundle.getSoftBundle());
focal_class.type: ManagedConcurrentValueMap<String, Class>
focal_class.var_name: classMap
focal_class.declarator: globalClosures = new ManagedConcurrentValueMap<>(ReferenceBundle.getHardBundle())
focal_class.modifier: private
focal_class.original_string: private ManagedConcurrentValueMap<String, Closure> globalClosures = new ManagedConcurrentValueMap<>(ReferenceBundle.getHardBundle());
focal_class.type: ManagedConcurrentValueMap<String, Closure>
focal_class.var_name: globalClosures
focal_class.declarator: loader
focal_class.modifier: private
focal_class.original_string: private GremlinGroovyClassLoader loader;
focal_class.type: GremlinGroovyClassLoader
focal_class.var_name: loader
focal_class.declarator: counter = new AtomicLong(0L)
focal_class.modifier: private
focal_class.original_string: private AtomicLong counter = new AtomicLong(0L);
focal_class.type: AtomicLong
focal_class.var_name: counter
focal_class.declarator: loadedPlugins = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final Set<String> loadedPlugins = new HashSet<>();
focal_class.type: Set<String>
focal_class.var_name: loadedPlugins
focal_class.declarator: factory
focal_class.modifier: private volatile
focal_class.original_string: private volatile GremlinGroovyScriptEngineFactory factory;
focal_class.type: GremlinGroovyScriptEngineFactory
focal_class.var_name: factory
focal_class.declarator: STATIC = "static"
focal_class.modifier: private static final
focal_class.original_string: private static final String STATIC = "static";
focal_class.type: String
focal_class.var_name: STATIC
focal_class.declarator: SCRIPT = "Script"
focal_class.modifier: private static final
focal_class.original_string: private static final String SCRIPT = "Script";
focal_class.type: String
focal_class.var_name: SCRIPT
focal_class.declarator: DOT_GROOVY = ".groovy"
focal_class.modifier: private static final
focal_class.original_string: private static final String DOT_GROOVY = ".groovy";
focal_class.type: String
focal_class.var_name: DOT_GROOVY
focal_class.declarator: GROOVY_LANG_SCRIPT = "groovy.lang.Script"
focal_class.modifier: private static final
focal_class.original_string: private static final String GROOVY_LANG_SCRIPT = "groovy.lang.Script";
focal_class.type: String
focal_class.var_name: GROOVY_LANG_SCRIPT
focal_class.declarator: importCustomizerProvider
focal_class.modifier: private
focal_class.original_string: private ImportCustomizerProvider importCustomizerProvider;
focal_class.type: ImportCustomizerProvider
focal_class.var_name: importCustomizerProvider
focal_class.declarator: customizerProviders
focal_class.modifier: private final
focal_class.original_string: private final List<CompilerCustomizerProvider> customizerProviders;
focal_class.type: List<CompilerCustomizerProvider>
focal_class.var_name: customizerProviders
focal_class.declarator: artifactsToUse = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final Set<Artifact> artifactsToUse = new HashSet<>();
focal_class.type: Set<Artifact>
focal_class.var_name: artifactsToUse
focal_class.declarator: interpreterModeEnabled
focal_class.modifier: private final
focal_class.original_string: private final boolean interpreterModeEnabled;
focal_class.type: boolean
focal_class.var_name: interpreterModeEnabled
focal_class.file: gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
focal_class.identifier: GremlinGroovyScriptEngine
focal_class.interfaces: implements DependencyManager, AutoCloseable
focal_class.class_method_signature: GremlinGroovyScriptEngine.GremlinGroovyScriptEngine()
focal_class.full_signature: public  GremlinGroovyScriptEngine()
focal_class.identifier: GremlinGroovyScriptEngine
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  GremlinGroovyScriptEngine()
focal_class.class_method_signature: GremlinGroovyScriptEngine.GremlinGroovyScriptEngine(final ImportCustomizerProvider importCustomizerProvider)
focal_class.full_signature: @Deprecated public  GremlinGroovyScriptEngine(final ImportCustomizerProvider importCustomizerProvider)
focal_class.identifier: GremlinGroovyScriptEngine
focal_class.modifiers: @Deprecated public
focal_class.parameters: (final ImportCustomizerProvider importCustomizerProvider)
focal_class.signature:  GremlinGroovyScriptEngine(final ImportCustomizerProvider importCustomizerProvider)
focal_class.class_method_signature: GremlinGroovyScriptEngine.GremlinGroovyScriptEngine(final CompilerCustomizerProvider... compilerCustomizerProviders)
focal_class.full_signature: public  GremlinGroovyScriptEngine(final CompilerCustomizerProvider... compilerCustomizerProviders)
focal_class.identifier: GremlinGroovyScriptEngine
focal_class.modifiers: public
focal_class.parameters: (final CompilerCustomizerProvider... compilerCustomizerProviders)
focal_class.signature:  GremlinGroovyScriptEngine(final CompilerCustomizerProvider... compilerCustomizerProviders)
focal_class.class_method_signature: GremlinGroovyScriptEngine.use(final String group, final String artifact, final String version)
focal_class.full_signature: @Override public synchronized List<GremlinPlugin> use(final String group, final String artifact, final String version)
focal_class.identifier: use
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final String group, final String artifact, final String version)
focal_class.return: List<GremlinPlugin>
focal_class.signature: List<GremlinPlugin> use(final String group, final String artifact, final String version)
focal_class.class_method_signature: GremlinGroovyScriptEngine.loadPlugins(final List<GremlinPlugin> plugins)
focal_class.full_signature: @Override public void loadPlugins(final List<GremlinPlugin> plugins)
focal_class.identifier: loadPlugins
focal_class.modifiers: @Override public
focal_class.parameters: (final List<GremlinPlugin> plugins)
focal_class.return: void
focal_class.signature: void loadPlugins(final List<GremlinPlugin> plugins)
focal_class.class_method_signature: GremlinGroovyScriptEngine.dependencies()
focal_class.full_signature: @Override public Map[] dependencies()
focal_class.identifier: dependencies
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map[]
focal_class.signature: Map[] dependencies()
focal_class.class_method_signature: GremlinGroovyScriptEngine.imports()
focal_class.full_signature: @Override public Map<String, Set<String>> imports()
focal_class.identifier: imports
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<String, Set<String>>
focal_class.signature: Map<String, Set<String>> imports()
focal_class.class_method_signature: GremlinGroovyScriptEngine.addImports(final Set<String> importStatements)
focal_class.full_signature: @Override public synchronized void addImports(final Set<String> importStatements)
focal_class.identifier: addImports
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (final Set<String> importStatements)
focal_class.return: void
focal_class.signature: void addImports(final Set<String> importStatements)
focal_class.class_method_signature: GremlinGroovyScriptEngine.plugins()
focal_class.full_signature: @Deprecated public Set plugins()
focal_class.identifier: plugins
focal_class.modifiers: @Deprecated public
focal_class.parameters: ()
focal_class.return: Set
focal_class.signature: Set plugins()
focal_class.class_method_signature: GremlinGroovyScriptEngine.getPlugins()
focal_class.full_signature: public Set getPlugins()
focal_class.identifier: getPlugins
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set
focal_class.signature: Set getPlugins()
focal_class.class_method_signature: GremlinGroovyScriptEngine.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: GremlinGroovyScriptEngine.reset()
focal_class.full_signature: @Override public void reset()
focal_class.identifier: reset
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: GremlinGroovyScriptEngine.internalReset()
focal_class.full_signature: private void internalReset()
focal_class.identifier: internalReset
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void internalReset()
focal_class.class_method_signature: GremlinGroovyScriptEngine.eval(final Reader reader, final ScriptContext context)
focal_class.full_signature: @Override public Object eval(final Reader reader, final ScriptContext context)
focal_class.identifier: eval
focal_class.modifiers: @Override public
focal_class.parameters: (final Reader reader, final ScriptContext context)
focal_class.return: Object
focal_class.signature: Object eval(final Reader reader, final ScriptContext context)
focal_class.class_method_signature: GremlinGroovyScriptEngine.eval(final String script, final ScriptContext context)
focal_class.full_signature: @Override public Object eval(final String script, final ScriptContext context)
focal_class.identifier: eval
focal_class.modifiers: @Override public
focal_class.parameters: (final String script, final ScriptContext context)
focal_class.return: Object
focal_class.signature: Object eval(final String script, final ScriptContext context)
focal_class.class_method_signature: GremlinGroovyScriptEngine.createBindings()
focal_class.full_signature: @Override public Bindings createBindings()
focal_class.identifier: createBindings
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Bindings
focal_class.signature: Bindings createBindings()
focal_class.class_method_signature: GremlinGroovyScriptEngine.getFactory()
focal_class.full_signature: @Override public ScriptEngineFactory getFactory()
focal_class.identifier: getFactory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ScriptEngineFactory
focal_class.signature: ScriptEngineFactory getFactory()
focal_class.class_method_signature: GremlinGroovyScriptEngine.compile(final String scriptSource)
focal_class.full_signature: @Override public CompiledScript compile(final String scriptSource)
focal_class.identifier: compile
focal_class.modifiers: @Override public
focal_class.parameters: (final String scriptSource)
focal_class.return: CompiledScript
focal_class.signature: CompiledScript compile(final String scriptSource)
focal_class.class_method_signature: GremlinGroovyScriptEngine.compile(final Reader reader)
focal_class.full_signature: @Override public CompiledScript compile(final Reader reader)
focal_class.identifier: compile
focal_class.modifiers: @Override public
focal_class.parameters: (final Reader reader)
focal_class.return: CompiledScript
focal_class.signature: CompiledScript compile(final Reader reader)
focal_class.class_method_signature: GremlinGroovyScriptEngine.invokeFunction(final String name, final Object... args)
focal_class.full_signature: @Override public Object invokeFunction(final String name, final Object... args)
focal_class.identifier: invokeFunction
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, final Object... args)
focal_class.return: Object
focal_class.signature: Object invokeFunction(final String name, final Object... args)
focal_class.class_method_signature: GremlinGroovyScriptEngine.invokeMethod(final Object thiz, final String name, final Object... args)
focal_class.full_signature: @Override public Object invokeMethod(final Object thiz, final String name, final Object... args)
focal_class.identifier: invokeMethod
focal_class.modifiers: @Override public
focal_class.parameters: (final Object thiz, final String name, final Object... args)
focal_class.return: Object
focal_class.signature: Object invokeMethod(final Object thiz, final String name, final Object... args)
focal_class.class_method_signature: GremlinGroovyScriptEngine.getInterface(final Class<T> clazz)
focal_class.full_signature: @Override public T getInterface(final Class<T> clazz)
focal_class.identifier: getInterface
focal_class.modifiers: @Override public
focal_class.parameters: (final Class<T> clazz)
focal_class.return: T
focal_class.signature: T getInterface(final Class<T> clazz)
focal_class.class_method_signature: GremlinGroovyScriptEngine.getInterface(final Object thiz, final Class<T> clazz)
focal_class.full_signature: @Override public T getInterface(final Object thiz, final Class<T> clazz)
focal_class.identifier: getInterface
focal_class.modifiers: @Override public
focal_class.parameters: (final Object thiz, final Class<T> clazz)
focal_class.return: T
focal_class.signature: T getInterface(final Object thiz, final Class<T> clazz)
focal_class.class_method_signature: GremlinGroovyScriptEngine.getScriptClass(final String script)
focal_class.full_signature:  Class getScriptClass(final String script)
focal_class.identifier: getScriptClass
focal_class.parameters: (final String script)
focal_class.return: Class
focal_class.signature: Class getScriptClass(final String script)
focal_class.class_method_signature: GremlinGroovyScriptEngine.isCached(final String script)
focal_class.full_signature:  boolean isCached(final String script)
focal_class.identifier: isCached
focal_class.parameters: (final String script)
focal_class.return: boolean
focal_class.signature: boolean isCached(final String script)
focal_class.class_method_signature: GremlinGroovyScriptEngine.eval(final Class scriptClass, final ScriptContext context)
focal_class.full_signature:  Object eval(final Class scriptClass, final ScriptContext context)
focal_class.identifier: eval
focal_class.parameters: (final Class scriptClass, final ScriptContext context)
focal_class.return: Object
focal_class.signature: Object eval(final Class scriptClass, final ScriptContext context)
focal_class.class_method_signature: GremlinGroovyScriptEngine.registerBindingTypes(final ScriptContext context)
focal_class.full_signature: private void registerBindingTypes(final ScriptContext context)
focal_class.identifier: registerBindingTypes
focal_class.modifiers: private
focal_class.parameters: (final ScriptContext context)
focal_class.return: void
focal_class.signature: void registerBindingTypes(final ScriptContext context)
focal_class.class_method_signature: GremlinGroovyScriptEngine.clearVarTypes()
focal_class.full_signature: private static void clearVarTypes()
focal_class.identifier: clearVarTypes
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearVarTypes()
focal_class.class_method_signature: GremlinGroovyScriptEngine.invokeImpl(final Object thiz, final String name, final Object args[])
focal_class.full_signature: private Object invokeImpl(final Object thiz, final String name, final Object args[])
focal_class.identifier: invokeImpl
focal_class.modifiers: private
focal_class.parameters: (final Object thiz, final String name, final Object args[])
focal_class.return: Object
focal_class.signature: Object invokeImpl(final Object thiz, final String name, final Object args[])
focal_class.class_method_signature: GremlinGroovyScriptEngine.createClassLoader()
focal_class.full_signature: private synchronized void createClassLoader()
focal_class.identifier: createClassLoader
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createClassLoader()
focal_class.class_method_signature: GremlinGroovyScriptEngine.use(final Artifact artifact)
focal_class.full_signature: private void use(final Artifact artifact)
focal_class.identifier: use
focal_class.modifiers: private
focal_class.parameters: (final Artifact artifact)
focal_class.return: void
focal_class.signature: void use(final Artifact artifact)
focal_class.class_method_signature: GremlinGroovyScriptEngine.callGlobal(final String name, final Object args[])
focal_class.full_signature: private Object callGlobal(final String name, final Object args[])
focal_class.identifier: callGlobal
focal_class.modifiers: private
focal_class.parameters: (final String name, final Object args[])
focal_class.return: Object
focal_class.signature: Object callGlobal(final String name, final Object args[])
focal_class.class_method_signature: GremlinGroovyScriptEngine.callGlobal(final String name, final Object args[], final ScriptContext ctx)
focal_class.full_signature: private Object callGlobal(final String name, final Object args[], final ScriptContext ctx)
focal_class.identifier: callGlobal
focal_class.modifiers: private
focal_class.parameters: (final String name, final Object args[], final ScriptContext ctx)
focal_class.return: Object
focal_class.signature: Object callGlobal(final String name, final Object args[], final ScriptContext ctx)
focal_class.class_method_signature: GremlinGroovyScriptEngine.generateScriptName()
focal_class.full_signature: private synchronized String generateScriptName()
focal_class.identifier: generateScriptName
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String generateScriptName()
focal_class.class_method_signature: GremlinGroovyScriptEngine.makeInterface(final Object obj, final Class<T> clazz)
focal_class.full_signature: @SuppressWarnings("unchecked") private T makeInterface(final Object obj, final Class<T> clazz)
focal_class.identifier: makeInterface
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (final Object obj, final Class<T> clazz)
focal_class.return: T
focal_class.signature: T makeInterface(final Object obj, final Class<T> clazz)
focal_class.class_method_signature: GremlinGroovyScriptEngine.getParentLoader()
focal_class.full_signature: protected ClassLoader getParentLoader()
focal_class.identifier: getParentLoader
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: ClassLoader
focal_class.signature: ClassLoader getParentLoader()
focal_class.class_method_signature: GremlinGroovyScriptEngine.readFully(final Reader reader)
focal_class.full_signature: private String readFully(final Reader reader)
focal_class.identifier: readFully
focal_class.modifiers: private
focal_class.parameters: (final Reader reader)
focal_class.return: String
focal_class.signature: String readFully(final Reader reader)
focal_class.superclass: extends GroovyScriptEngineImpl
focal_method.body: @Override
      public Object eval(final Reader reader, final ScriptContext context) throws ScriptException {
          return eval(readFully(reader), context);
      }
focal_method.class_method_signature: GremlinGroovyScriptEngine.eval(final Reader reader, final ScriptContext context)
focal_method.full_signature: @Override public Object eval(final Reader reader, final ScriptContext context)
focal_method.identifier: eval
focal_method.invocations: eval readFully
focal_method.modifiers: @Override public
focal_method.parameters: (final Reader reader, final ScriptContext context)
focal_method.return: Object
focal_method.signature: Object eval(final Reader reader, final ScriptContext context)