It clones original object into the new one. It is necessary to retain the options information valid
for all nodes.
@param original Object to clone
@returns {Object} Cloned object
761246
function (original) {
                var clone = {};
                var i, keys = Object.keys(original);

                for (i = 0; i < keys.length; i++) {
                    // copy each property into the clone
                    clone[keys[i]] = original[keys[i]];
                }

                return clone;
            }
302818
function(node) {
			var newNode = node.cloneNode(true);
			if(this.hasAttribute(node, 'id')){
				this.removeAttribute(node, 'id')
			}
			return newNode;
		}
959620
function(obj) {
        if (obj == null) {
            obj = new OpenLayers.Layer.WMTS(this.options);
        }
        //get all additions from superclasses
        obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);
        // copy/set any non-init, non-simple values here
        return obj;
    }
502006
function clone(obj) {
    if (Array.isArray(obj)) {
        return obj.map(clone);
    } else if (typeof obj === 'object') {
        var copy = {};
        Object.keys(obj).forEach(function (key) {
            copy[key] = clone(obj[key]);
        });
        return copy;
    }
    return obj;
}
1007365
public static <T> T cloneIfPossible(final T obj) {
		T clone = null;
		try {
			clone = clone(obj);
		} catch (Exception e) {
			// pass
		}
		return clone == null ? obj : clone;
	}
885172
function clone(source, deep) {
    if (deep) {
        return lodash.cloneDeep(source);
    } else {
        return lodash.clone(source);
    }
}
1156372
function clone(a) {
  return a === undefined ? undefined : JSON.parse(JSON.stringify(a))
}
1074482
function extend() {
    var src, copy, name, options, clone;
    var target = arguments[0] || {};
    var i = 1;
    var length = arguments.length;

    for ( ; i < length; i++ ) {
      // Only deal with non-null/undefined values
      if ( (options = arguments[ i ]) != null ) {
        // Extend the base object
        for ( name in options ) {
          src = target[ name ];
          copy = options[ name ];

          // Prevent never-ending loop
          if ( target === copy ) {
            continue;
          }

          // Recurse if we're merging plain objects or arrays
          if ( copy && typeof copy === "object" ) {
            clone = src && typeof src === "object" ? src : {};

            // Never move original objects, clone them
            target[ name ] = extend( clone, copy );

          // Don't bring in undefined values
          } else if ( copy !== undefined ) {
            target[ name ] = copy;
          }
        }
      }
    }

    // Return the modified object
    return target;
  }
709945
function cloneObj(obj, exclude) {
  var type = _typeof(obj);

  switch (type) {
    case 'undefined':
    case 'boolean':
    case 'nuber':
    case 'string':
    case 'function':
      return obj;
      break;

    case 'object':
      if (obj === null) {
        // null is object
        return obj;
      }

      var r;

      if (isArray(obj)) {
        r = [];
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;

        try {
          for (var _iterator3 = obj[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var item = _step3.value;
            r.push(cloneObj(item, exclude));
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
              _iterator3.return();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      } else {
        r = {};

        for (var _i7 = 0, _Object$keys2 = Object.keys(obj); _i7 < _Object$keys2.length; _i7++) {
          var key = _Object$keys2[_i7];

          if (!exclude || isArray(exclude) && !exclude.includes(key) || !exclude(key, obj[key], obj)) {
            r[key] = cloneObj(obj[key], exclude);
          }
        }
      }

      return r;
      break;

    default:
      return obj;
      break;
  }
}
546729
function (originalObj, originalProp, targetObj, targetProp) {
                Object.defineProperty(
                    originalObj,
                    originalProp,
                    {
                        get: function () {
                            return targetObj[targetProp];
                        },
                        set: function (newValue) {
                            targetObj[targetProp] = newValue;
                        }
                    }
                );
            }
708689
@Override
    public ModelNode cloneModel()
    {
        int len = mSubModels.length;
        ModelNode[] newModels = new ModelNode[len];
        for (int i = 0; i < len; ++i) {
            newModels[i] = mSubModels[i].cloneModel();
        }
        return new ChoiceModel(newModels);
    }
665376
function clone(node) {
  const copy = node.clone();
  copy.changeGroup = node.changeGroup;
  if (node.args) {
    node.args.forEach((child, i) => {
      copy.args[i] = clone(child);
    });
  }
  else if (node.content) {
    copy.content = clone(node.content);
  }
  return copy;
}
1162190
function (options) {
                    var ret = {};
                    options = options || {};

                    for (var key in this.$) {
                        if (this.$.hasOwnProperty(key)) {
                            if (options.exclude) {
                                if (options.exclude instanceof Array) {
                                    if (_.include(options.exclude, key)) {
                                        ret[key] = this.$[key];
                                        continue;
                                    }
                                }
                            }
                            if (this.$bindings.hasOwnProperty(key) && this.factory.prototype.defaults.hasOwnProperty(key)) {
                                ret[key] = this.factory.prototype.defaults[key];
                            } else {
                                ret[key] = this._cloneAttribute(this.$[key], key);
                            }

                        }
                    }
                    var b = new this.factory(ret, true);
                    b._$source = this;
                    b.$injected = this.$injected;
                    return b;
                }
16508
function clone(source) {
    var ret = {};
    for (var prop in source) {
      ret[prop] = source[prop];
    }
    return ret;
  }
420302
function _clone(src) {
  if (!src) {
    return src;
  }

  if (typeof src.clone === 'function') {
    return src.clone();
  } else if (_isPlainObject(src) || _isArray(src)) {
    let ret = new (src.constructor);

    Object.getOwnPropertyNames(src).forEach(function(key) {
      if (typeof src[key] !== 'function') {
        ret[key] = _clone(src[key]);
      }
    });

    return ret;
  } else {
    return JSON.parse(JSON.stringify(src));
  }
}
193443
function clone(object, deep) {
		if (!object) { return object; }
		var clone = object.prototype
						? Object.create(object.prototype.constructor) : {};

		for(var key in object) {
			if (!object.hasOwnProperty(key)) { continue; }
			clone[key] = deep ? clone(object[key], deep) : object[key];
		}
		return clone;
	}
538141
function clone(map) {
  return map instanceof SourceMapGenerator
    ? SourceMapGenerator.fromSourceMap(new SourceMapConsumer(map.toJSON()))
    : map;
}