code: public void setBindings(Bindings bindings, int scope) {
  
  	if (scope == ScriptContext.GLOBAL_SCOPE) {
  	    context.setBindings(bindings, ScriptContext.GLOBAL_SCOPE);
  	    ;
  	}
  	else if (scope == ScriptContext.ENGINE_SCOPE) {
  	    context.setBindings(bindings, ScriptContext.ENGINE_SCOPE);
  	    ;
  	}
  	else {
  	    throw new IllegalArgumentException("Invalid scope value.");
  	}
      }
docs: Sets the <code>Bindings</code> with the corresponding scope value in the <code>context</code>
  field.
  
  @param bindings The specified <code>Bindings</code>.
  @param scope The specified scope.
  
  @throws IllegalArgumentException if the value of scope is invalid for the type the
  <code>context</code> field.
  @throws NullPointerException if the bindings is null and the scope is
  <code>ScriptContext.ENGINE_SCOPE</code>