code: public void put(String name, Scriptable start, Object value) {
          if (start == this) {
              synchronized (this) {
                  if (isEmpty(name)) {
                      indexedProps.put(name, value);
                  } else {
                      synchronized (context) {
                          int scope = context.getAttributesScope(name);
                          if (scope == -1) {
                              scope = ScriptContext.ENGINE_SCOPE;
                          }
                          context.setAttribute(name, jsToJava(value), scope);
                      }
                  }
              }
          } else {
              start.put(name, start, value);
          }
      }
docs: Sets the value of the named property, creating it if need be.
  
  @param name the name of the property
  @param start the object whose property is being set
  @param value value to set the property to