Merge two TentativeType instances
357746
def merge(self, other):
        # type: (TentativeType) -> None
        
        for hashables in other.types_hashable:
            self.add(hashables)
        for non_hashbles in other.types:
            self.add(non_hashbles)
395892
public void mergeWith(OptionalBoolean other) {
		if (state == other.state) {
			// no change in state
		} else if (state == State.UNSET) {
			state = other.state;
		} else if (other.state == State.UNSET) {
			// no change in state
		} else {
			state = State.CONFLICTING;
		}
	}
691379
static boolean mergeKeepUpdate(Session session, HashMappedList rowSet,
                                   int[] cols, Type[] colTypes, Row row,
                                   Object[] newData) {

        Object[] data = (Object[]) rowSet.get(row);

        if (data != null) {
            if (IndexAVL
                    .compareRows(row
                        .getData(), newData, cols, colTypes) != 0 && IndexAVL
                            .compareRows(newData, data, cols, colTypes) != 0) {
                return false;
            }

            for (int j = 0; j < cols.length; j++) {
                newData[cols[j]] = data[cols[j]];
            }

            rowSet.put(row, newData);
        } else {
            rowSet.add(row, newData);
        }

        return true;
    }
862091
def merge_extends(self, target, extends, inherit_key="inherit", inherit=False):
        
        if isinstance(target, dict):
            if inherit and inherit_key in target and not to_boolean(target[inherit_key]):
                return
            if not isinstance(extends, dict):
                raise ValueError("Unable to merge: Dictionnary expected")
            for key in extends:
                if key not in target:
                    target[str(key)] = extends[key]
                else:
                    self.merge_extends(target[key], extends[key], inherit_key, True)
        elif isinstance(target, list):
            if not isinstance(extends, list):
                raise ValueError("Unable to merge: List expected")
            target += extends
1075672
def merge(other = {})
      coa!
      varset = self.class.new
      varset.instance_variable_set(:@coa_vars, @coa_vars.dup)
      varset.append(other)
    end
1176570
def MergeFrom(self, other):
    
    self._values.extend(other._values)
    self._message_listener.Modified()
603698
function mergeInner(base, mixin, mergeArrays) {
    if (base === null || typeof base !== 'object' || Array.isArray(base)) {
        throw new Error('base must be object');
    }
    if (mixin === null || typeof mixin !== 'object' || Array.isArray(mixin)) {
        throw new Error('mixin must be object');
    }
    Object.keys(mixin).forEach((name) => {
        mergeHelper(base, mixin, name, mergeArrays);
    });
}
499067
def merge(self, other):
        
        other.qualify()
        for n in ('name',
                  'qname',
                  'min',
                  'max',
                  'default',
                  'type',
                  'nillable',
                  'form_qualified',):
            if getattr(self, n) is not None:
                continue
            v = getattr(other, n)
            if v is None:
                continue
            setattr(self, n, v)
216421
function merge(iterable /* ...iterbles */) {
    var map = anObject(this);
    var setter = aFunction(map.set);
    var i = 0;
    while (i < arguments.length) {
      iterate(arguments[i++], setter, map, true);
    }
    return map;
  }
149182
function merge(prev, current, next) {
  return prev
    .concat()
    .reverse()
    .concat([current], next)
}
1341636
def merge(self, other):
        """"""
        assert self.attrs == other.attrs
        self.tokens.extend(other.tokens)
        self.spaces.extend(other.spaces)
        self.strings.update(other.strings)
1253722
def merge(self, other):
        """"""
        if not isinstance(other, MetadataRb):
            raise TypeError("MetadataRb to merge should be a 'MetadataRb' "
                            "instance, not %s.", type(other))
        current = self.to_dict()
        new = other.to_dict()

        # compare and gather cookbook dependencies
        meta_writelines = ['%s\n' % self.depends_statement(cbn, meta)
                           for cbn, meta in new.get('depends', {}).items()
                           if cbn not in current.get('depends', {})]

        self.write_statements(meta_writelines)
        return self.to_dict()
260047
public static void mergeInto(Map<String, OptionalFailure<Accumulator<?, ?>>> target, Map<String, Accumulator<?, ?>> toMerge) {
		for (Map.Entry<String, Accumulator<?, ?>> otherEntry : toMerge.entrySet()) {
			OptionalFailure<Accumulator<?, ?>> ownAccumulator = target.get(otherEntry.getKey());
			if (ownAccumulator == null) {
				// Create initial counter (copy!)
				target.put(
					otherEntry.getKey(),
					wrapUnchecked(otherEntry.getKey(), () -> otherEntry.getValue().clone()));
			}
			else if (ownAccumulator.isFailure()) {
				continue;
			}
			else {
				Accumulator<?, ?> accumulator = ownAccumulator.getUnchecked();
				// Both should have the same type
				compareAccumulatorTypes(otherEntry.getKey(),
					accumulator.getClass(), otherEntry.getValue().getClass());
				// Merge target counter with other counter

				target.put(
					otherEntry.getKey(),
					wrapUnchecked(otherEntry.getKey(), () -> mergeSingle(accumulator, otherEntry.getValue().clone())));
			}
		}
	}
1103662
function _merge(o1, o2) {
    Object.keys(o2).forEach(function (k) {
        if (o1[k] === undefined) {
            o1[k] = o2[k];
        } else {
            if ((typeof (o1[k])) === 'object') {
                _merge(o1[k], o2[k]);
            } else { // Last property wins!
                o1[k] = o2[k];
            }
        }
    });
}
1037608
function merge(source, target) {
    if (target == null) {
        return clone(source);
    }
    if (source == null) {
        return clone(target);
    }
    if (typeof source !== 'object' || typeof target !== 'object') {
        return clone(target);
    }
    const merge = (source, target) => {
        Object.keys(target).forEach(key => {
            if (source[key] == null) {
                source[key] = target[key];
            } else if (typeof source[key] === 'object') {
                if (typeof target[key] === 'object') {
                    merge(source[key], target[key]);
                } else {
                    source[key] = target[key];
                }
            } else {
                source[key] = target[key];
            }
        });

        return source;
    };

    return merge(clone(source), clone(target));
}
1297428
function mergeTypes(...types) {
  let allTypes = [];
  types.forEach(type => {
    (type.allTypes || [type]).forEach(type => {
      if (allTypes.indexOf(type) < 0) allTypes.push(type);
    });
  });
  return allTypes;
}
993921
private FunctionType tryMergeFunctionPiecewise(FunctionType other, boolean leastSuper) {
    Node newParamsNode = null;
    if (call.hasEqualParameters(other.call, EquivalenceMethod.IDENTITY, EqCache.create())) {
      newParamsNode = call.parameters;
    } else {
      // If the parameters are not equal, don't try to merge them.
      // Someday, we should try to merge the individual params.
      return null;
    }

    JSType newReturnType =
        leastSuper
            ? call.returnType.getLeastSupertype(other.call.returnType)
            : call.returnType.getGreatestSubtype(other.call.returnType);

    JSType newTypeOfThis = null;
    if (isEquivalent(typeOfThis, other.typeOfThis)) {
      newTypeOfThis = typeOfThis;
    } else {
      JSType maybeNewTypeOfThis =
          leastSuper
              ? typeOfThis.getLeastSupertype(other.typeOfThis)
              : typeOfThis.getGreatestSubtype(other.typeOfThis);
      newTypeOfThis = maybeNewTypeOfThis;
    }

    boolean newReturnTypeInferred = call.returnTypeInferred || other.call.returnTypeInferred;

    return builder(registry)
        .withParamsNode(newParamsNode)
        .withReturnType(newReturnType, newReturnTypeInferred)
        .withTypeOfThis(newTypeOfThis)
        .build();
  }