copy properties from the source object to the
target object. We don't use `Object.keys` here, since
"mixin" also adds non-enumerable keys.

@param  {*} `value`
@param  {String} `key`
15064
function copy(target, obj) {
  if (isObject(obj)) {
    forIn(obj, function(value, key) {
      target[key] = value;
    });
  }
}
358709
public Object put(Object key, Object value) {
    return next.put(key, value);
  }
15551
function assignMergeValue(object, key, value) {
    if (value !== undefined && !eq(object[key], value) || typeof key == 'number' && value === undefined && !(key in object)) {
      object[key] = value;
    }
  }
907832
public void set(PropertyKey key, String value) {
    put(key, value, Source.RUNTIME);
  }
722708
public Object put(String key, Object value) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", new Object[]{key, PasswordUtils.replaceValueIfKeyIsPassword(key,value)});

    // If the value is null (which is allowed for a Map Message) we can't tell
    // quickly whether the item is already in the map as null, or whether it doesn't exist,
    // so we just assume it will cause a change.
    // For properties we will never get a value of null, and it is properties we are really concerned with.
    if ((!changed)&& (value != null)) {
      Object old = get(key);
      if (value.equals(old)) {          // may as well call equals immediately, as it checks for == and we know value!=null
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put",  "unchanged");
        return old;
      }
      else {
        changed = true;
        Object result = copyMap().put(key, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", PasswordUtils.replaceValueIfKeyIsPassword(key,result));
        return result;
      }
    }
    else {
      changed = true;
      Object result = copyMap().put(key, value);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", PasswordUtils.replaceValueIfKeyIsPassword(key,result));
      return result;
    }
  }
1334977
public void set(String key, Object value) {
		if (globalVar == null) globalVar = new HashMap<String, Object>();
		globalVar.put(key, value);
	}
1261587
function set (target, key, value) {
  const obj = {}
  obj[key] = value
  return Object.assign({}, target, obj)
}
1122872
public void addProperty(String key, Object value) throws ProcessBagException {
        if (properties.containsKey(key)) {
            throw new ProcessBagException(key + " already used!");
        } else {
            properties.put(key, value);
        }
    }
253573
function(key, value) {
      if (typeof key === 'object') {
        for (var prop in key) {
          this._set(prop, key[prop]);
        }
      }
      else {
        if (typeof value === 'function') {
          this._set(key, value(this.get(key)));
        }
        else {
          this._set(key, value);
        }
      }
      return this;
    }
790227
@SuppressWarnings({
     "unchecked", "rawtypes"
    })
    @Override
    public void extend(final String key, final Object value) {
        final Object v = configuration.get(key);
        if (v == null) {
            final Object array = Array.newInstance(value.getClass(), 1);
            Array.set(array, 0, value);
            configuration.put(key, array);
        }
        else {
            final Class<?> clazz = v.getClass();
            if (clazz.isArray()) {
                final int length = Array.getLength(v);
                final Object array = Array.newInstance(clazz.getComponentType(), length + 1);
                System.arraycopy(v, 0, array, 0, length);
                Array.set(array, length, value);
                configuration.put(key, array);
            }
            else if (v instanceof Collection) {
                ((Collection) v).add(value);
            }
            else {
                final String message = String.format("Cannot extend %s by %s.", key, value);
                throw new IllegalArgumentException(message);
            }
        }
    }
785409
function set(key, value) {
  const entry = this.get(key, true);
  let oldvalue;
  if (entry) {
    oldvalue = entry.value;
    entry.value = value;
  } else {
    oldvalue = this.put(key, value);
    if (oldvalue) oldvalue = oldvalue.value;
  }
  return oldvalue;
}
1329102
function KeysAnd(values) {
	var vals = this.values = {};
	canReflect.eachKey(values, function(value, key) {
		if (canReflect.isPlainObject(value) && !set.isSpecial(value)) {
			vals[key] = new KeysAnd(value);
		} else {
			vals[key] = value;
		}
	});
}
802134
function mix(self, ref) {
	if (ref === undefined) return self;
	if ((typeof(ref) != 'object') || (typeof(self) != 'object') || isValueObject(self)) return ref;
	Object.keys(ref).forEach(function(key) { self[key] = mix(self[key], ref[key]) });
	return self;
}
510357
function(key, value){
                            var json = null;
                            try { json = JSON.parse(value); } catch (e){} //try get json
                            if (json === null) json = $scope.utils.tryGetFunction(value) || json; //try get function

                            /* add element to the object */
                            if ($scope.node.type() === 'object') {
                                if (json !== null){
                                    $scope.json[key] = json
                                } else {
                                    $scope.json[key] = value
                                }

                            }
                            /* add element(s) to the array */
                            else if ($scope.node.type() === 'array') {
                                if (json !== null) {
                                    if (json.constructor === Array){
                                        /* push new array elements to the array */
                                        $scope.json.push.apply($scope.json, json);
                                    } else {
                                        /* push single element to the array */
                                        $scope.json.push(json);
                                    }
                                } else {
                                    $scope.json.push(value);
                                }
                            }
                            $scope.refresh();
                        }
916965
function(key, value) {
        this._removeRemove(this.sets.remove, key);
        var op = this._getOp(this.sets.removes, key);
        if (op) {
            op.remove.push(value);
        } else {
            this.sets.removes.push({key: key, remove: [value]});
        }
        return this;
    }
1297837
function(key, value) {
    var array = this[key = hashKey(key)];
    if (!array) {
      this[key] = [value];
    } else {
      array.push(value);
    }
  }
359818
function mixin(target, properties) {
    Object.keys(properties).forEach(function(prop) {
      target[prop] = properties[prop];
    });
  }