Simple function to mix in properties from source into target,
but only if target does not already have a property of the same name.
501851
function mixin(target, source, force, deepStringMixin) {
        if (source) {
            eachProp(source, function (value, prop) {
                if (force || !hasProp(target, prop)) {
                    if (deepStringMixin && typeof value !== 'string') {
                        if (!target[prop]) {
                            target[prop] = {};
                        }
                        mixin(target[prop], value, force, deepStringMixin);
                    } else {
                        target[prop] = value;
                    }
                }
            });
        }
        return target;
    }
940116
function _merge (opts, target, source) {
  var i
  var j
  var tmp
  var test
  var equal
  var key
  var s = { // hold booleans for source
    isObj: util.isObject(source),
    isFn: util.isFunction(source),
    isArr: util.isArray(source)
  }
  var t = { // hold booleans for target
    isObj: util.isObject(target),
    isFn: util.isFunction(target),
    isArr: util.isArray(target)
  }

  if (!opts._visited) {
    opts._visited = []
  }

  if (target === source || // for primitives or null
    undefined === source // target stays the same
  ) {
    return target
  }

  if (source === null) {
    if (!opts.ignoreNull || target === undefined) {
      target = source
    }
    return target
  }

  if (target === null || undefined === target) {
    if (s.isObj && s.isArr) {
      // clone into array
      target = _merge(opts, [], source)
    } else if (s.isObj) {
      // clone source
      target = _merge(opts, {}, source)
    } else {
      // copy primitives
      target = source
    }
    return target
  }

  // create new instances for "special" objects
  if (s.isObj) {
    if (util.isRegExp(source)) {
      // create new RegExp
      target = new RegExp(source)
      return target
    } else if (util.isDate(source)) {
      // create new Date
      target = new Date(source)
      return target
    } else if (util.isBuffer(source)) {
      // create new Buffer
      target = new Buffer(source)
      return target
    }
  }

  if (s.isFn) { // replace with source function
    target = source
    // TODO - clone possible keys
    return target
  }

  if (s.isArr) {
    if (t.isArr) {
      test = [].concat(target) // test for duplicates
      for (i = 0; i < source.length; i++) {
        tmp = source[i]
        if (!~test.indexOf(tmp)) {
          if (!util.isObject(tmp) || tmp === null) { // primitive or function or null or undefined
            target.push(tmp)
          } else {
            equal = false
            j = test.length
            while (j-- > 0 && !(equal = deepEqual(test[j], tmp)));
            if (!equal) target.push(_merge(opts, null, tmp))
          }
        }
      }
    } else {
      // if target is not array replace with source
      target = _merge(opts, [], source)
    }
    return target
  }

  if (!t.isFn && !t.isObj && !t.isArr) {
    // copy primitives
    target = source
    return target
  }

  // copy properties if not circular
  if (!~opts._visited.indexOf(source)) {
    opts._visited.push(source)
    for (key in source) {
      if (source.hasOwnProperty(key) && key !== '__proto__') {
        target[key] = _merge(opts, target[key], source[key])
      }
    }
    opts._visited.pop()
  } else if (!opts.ignoreCircular) {
    throw new Error('can not merge circular structures.')
  }

  return target
}
1107823
function mergeProperties(target, source, enumerable) {

    forEachDesc(source, function(name, desc) { return mergeProperty(target, name, desc, enumerable); });
}
658092
function mergeObject(target, source, create) {
  if (!source || !target) return;
  for (let pn in source) {
    if (_.has(target, pn) || create)
      target[pn] = source[pn];
  }
}
106014
function safeMixin(target, source) {
        var name, t;
        // add props adding metadata for incoming functions skipping a constructor
        for (name in source) {
            t = source[name];
            if ((t !== op[name] || !(name in op)) && name !== cname) {
                if (opts.call(t) === "[object Function]") {
                    // non-trivial function method => attach its name
                    t.nom = name;
                }
                target[name] = t;
            }
        }
        return target;
    }
31529
function applyMixins(properties) {
  var mixins = properties.__mixins__
  if (type(mixins) != 'array') {
    mixins = [mixins]
  }
  var mixedProperties = {}
  for (var i = 0, l = mixins.length; i < l; i++) {
    mixin(mixedProperties, mixins[i])
  }
  delete properties.__mixins__
  return extend(mixedProperties, properties)
}
972145
function mergeDeep(target, ...sources) {
  if (!sources.length) return target;
  const source = sources.shift();

  if (isObject(target) && isObject(source)) {
    for (const key in source) {
      if (isObject(source[key])) {
        if (!target[key]) Object.assign(target, { [key]: {} });
        mergeDeep(target[key], source[key]);
      } else {
        Object.assign(target, { [key]: source[key] });
      }
    }
  }

  return mergeDeep(target, ...sources);
}
173095
function supersede(target, source, force, deepStringMixin) {
    if (source) {
        eachProp(source, function (value, prop) {
            if (hasProp(target, prop)) {
                if (deepStringMixin && typeof value === 'object' && value && !isArray(value) && !isFunction(value) && !(value instanceof RegExp)) {

                    if (!target[prop]) {
                        target[prop] = {};
                    }
                    supersede(target[prop], value, force, deepStringMixin);
                } else {
                    target[prop] = value;
                }
            }
        });
    }
    return target;
}
460438
function mixinConstructor(source)
{
  var keys = Object.keys(source)
    , i    = keys.length
    ;

  while (i-- > 0) {
    this[keys[i]] = source[keys[i]];
  }
}
1031245
function extend(target) {
    for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i]
            , keys   = Object.keys(source);

        for (var j = 0; j < keys.length; j++) {
            var name = keys[j];
            target[name] = source[name];
        }
    }

    return target;
}
1196586
function extend(target) {
	for(var i = 1; i < arguments.length; i++) {
		target = _mergeProperties(target, arguments[i]);
	}

	return target;
}
364477
private T copyProperties(T source) {
        T target = createEmpty(source.getClass());

        Map<String, PropertyDescriptor> mapTargetProps = MappingUtils.mapPropertyDescriptors(target.getClass());
        Map<String, PropertyDescriptor> mapSourceProps = MappingUtils.mapPropertyDescriptors(source.getClass());

        Object value = null;

        for (String propertyName : mapSourceProps.keySet()) {
            value = MappingUtils.callGetter(source, mapSourceProps.get(propertyName));

            MappingUtils.callSetter(target, mapTargetProps.get(propertyName), value);
        }

        return target;
    }
967299
function(_target) {
      for(var i = 1; i < arguments.length; i++) {
        var other = arguments[i];
        for(var key in other) {
          if(other.hasOwnProperty(key)) {
            _target[key] = _target[key] && typeof _target[key] === 'function' ? Utils.override(_target[key], other[key]) : other[key];
          }
        }
      }

      return _target;
    }
833122
function extend(targetObj, sourceObject) {
        for (var key in sourceObject) {
            if (sourceObject.hasOwnProperty(key)) {
                targetObj[key] = sourceObject[key];
            }
        }
    }
771886
function copyOwn(source, target, inherits, publicStatic, allowInit, isNOTExtendingNative) {
    for (var
      key,
      noFunctionCheck = typeof source !== 'function',
      names = oK(source),
      i = 0; i < names.length; i++
    ) {
      key = names[i];
      if (
        (noFunctionCheck || indexOf.call(nativeFunctionOPN, key) < 0) &&
        isNotASpecialKey(key, allowInit)
      ) {
        if (hOP.call(target, key)) {
          warn('duplicated: ' + key.toString());
        }
        setProperty(inherits, target, key, gOPD(source, key), publicStatic, isNOTExtendingNative);
      }
    }
  }
314280
function(key, target, source) {
		var tval = target[key];
		var sval = source[key];

		if (helpers.isObject(tval) && helpers.isObject(sval)) {
			helpers.mergeIf(tval, sval);
		} else if (!target.hasOwnProperty(key)) {
			target[key] = helpers.clone(sval);
		}
	}
117905
private Properties copyProperties(Properties source)
    {
        Properties copy = new Properties();

        if (source != null)
        {
            copy.putAll(source);
        }

        return copy;
    }