{@inheritDoc}

@see org.jboss.shrinkwrap.api.Archive#merge(org.jboss.shrinkwrap.api.Archive, org.jboss.shrinkwrap.api.Filter)
966302
@Override
    public T merge(Archive<?> source, Filter<ArchivePath> filter) throws IllegalArgumentException {
        return merge(source, new BasicPath(), filter);
    }
360961
public void merge(GridHubConfiguration other) {
    if (other == null) {
      return;
    }
    super.merge(other);

    if (isMergeAble(CapabilityMatcher.class, other.capabilityMatcher, capabilityMatcher)) {
      capabilityMatcher = other.capabilityMatcher;
    }
    if (isMergeAble(Integer.class, other.newSessionWaitTimeout, newSessionWaitTimeout)) {
      newSessionWaitTimeout = other.newSessionWaitTimeout;
    }
    if (isMergeAble(Prioritizer.class, other.prioritizer, prioritizer)) {
      prioritizer = other.prioritizer;
    }
    if (isMergeAble(Boolean.class, other.throwOnCapabilityNotPresent, throwOnCapabilityNotPresent)) {
      throwOnCapabilityNotPresent = other.throwOnCapabilityNotPresent;
    }
    if (isMergeAble(String.class, other.registry, registry)) {
      registry = other.registry;
    }
  }
369479
public static <T> void mergeFrom(byte[] data, T message, Schema<T> schema,
            boolean numeric) throws IOException
    {
        mergeFrom(data, 0, data.length, message, schema, numeric);
    }
1360955
function mergeToMap(arrFileObj) {
	return arrFileObj.reduce(function(result, fileObj) {
		var name;
		var libData;
		for (name in fileObj) {
			libData = fileObj[name];
			obj.setObject(result, [libData.suite, libData.browser, libData.name], libData);
		}
		return result;
	}, {});
}
1244875
@Override
    public Map<ArchivePath, Node> getContent(Filter<ArchivePath> filter) {
        return this.getArchive().getContent(filter);
    }
90165
@Override
    public final Archive<T> shallowCopy(Filter<ArchivePath> filter) {
        Validate.notNull(filter, "Filter must be specified");
        // Use existing configuration
        final Configuration configuration = this.getConfiguration();

        // Create a new archive to which we'll shallow copy all assets
        final Archive<T> from = this;

        //TODO SHRINKWRAP-362
        /*
         * The design of this particular hack is particularly offensive:
         *
         * First off, we're binding this abstract parent to use a specific
         * implementation in creating new instances.
         *
         * Second, there's the unchecked casting.
         *
         * Mostly, however, is that this "shallowCopy" issue
         * denoted by SHRINKWRAP-353 calls into question
         * the whole design of having ArchiveBase implement
         * the full contract set defined by Archive.  Archive is
         * targeted to be an end-user view; and ArchiveBase is really
         * a set of operations for the underlying storage mechanism.  What
         * would be much more appropriate is a contract set for Archive, and
         * a separate contract for the underlying storage (ie. file system).
         * To be addressed in SHRINKWRAP-362.
         *
         */
        @SuppressWarnings("unchecked")
        final Archive<T> to = Archive.class.cast(new MemoryMapArchiveImpl(configuration));

        // Now loop through and add all content
        for (final ArchivePath path : from.getContent().keySet()) {
            Asset asset = from.get(path).getAsset();
            if (asset != null) {
                if(!filter.include(path)) {
                    continue;
                }
                to.add(asset, path);
            }
        }

        // Return
        return to;
    }
1293648
function mergeNewAndOldMeta(old, updated) {
  const merged = {
    firstPublishTime: old.firstPublishTime || updated.publishTime
  };

  if (!Object.keys(old).length) {
    return updated;
  }

  if (old.history && updated.history) {
    merged.history = old.history.concat(updated.history);
  }

  return Object.assign(old, updated, merged);
}
1279337
function addMergeFile(files, fileIds, filter) {
    if (!fileIds) {
        return;
    }
    for (var i = 0, len = fileIds.length; i < len; i++) {
        var item = filter(fileIds[i]);
        item && files.push(item);
    }
}
1084319
@Override
    protected Map<String, List<Object>> mergePersonAttributes(final Map<String, List<Object>> toModify, final Map<String, List<Object>> toConsider) {
        Validate.notNull(toModify, "toModify cannot be null");
        Validate.notNull(toConsider, "toConsider cannot be null");

        for (final Map.Entry<String, List<Object>> sourceEntry : toConsider.entrySet()) {
            final String sourceKey = sourceEntry.getKey();

            List<Object> destList = toModify.get(sourceKey);
            if (destList == null) {
                destList = new LinkedList<>();
                toModify.put(sourceKey, destList);
            }

            final List<Object> sourceValue = sourceEntry.getValue();
            destList.addAll(sourceValue);
        }

        return toModify;
    }
213179
@Override
    public T merge(final Archive<?> source, final String path, final Filter<ArchivePath> filter)
        throws IllegalArgumentException {
        Validate.notNull(path, "path must be specified");
        return this.merge(source, ArchivePaths.create(path), filter);
    }
723582
private Ringbuffer<Object> merge(RingbufferContainer<Object, Object> existingContainer, RingbufferMergeTypes mergingValue) {
        RingbufferMergeTypes existingValue = createMergingValueOrNull(existingContainer);

        RingbufferMergeData resultData = mergePolicy.merge(mergingValue, existingValue);

        if (resultData == null) {
            ringbufferService.destroyDistributedObject(namespace.getObjectName());
            return null;
        } else {
            if (existingContainer == null) {
                RingbufferConfig config = getRingbufferConfig(ringbufferService, namespace);
                existingContainer = ringbufferService.getOrCreateContainer(getPartitionId(), namespace, config);
            }
            setRingbufferData(resultData, existingContainer);
            return existingContainer.getRingbuffer();
        }
    }
1285332
def _merge_filters(self) -> None:
        """"""
        for opts in (["-filter:a", "-af"], ["-filter:v", "-vf"]):
            filter_list = []
            new_argv = []
            cmd_iter = iter(self._argv)
            for element in cmd_iter:
                if element in opts:
                    filter_list.insert(0, next(cmd_iter))
                else:
                    new_argv.append(element)

            # update argv if changes
            if filter_list:
                new_argv.extend([opts[0], ",".join(filter_list)])
                self._argv = new_argv.copy()
1146252
@MapMethod
    public Map<String,Object> merge(List<Map<String,Object>> args){
        return Objects.merge(args);
    }
56976
@Override
    public Set<String> mergeAvailableQueryAttributes(final Set<String> toModify, final Set<String> toConsider) {
        toModify.addAll(toConsider);
        return toModify;
    }
852906
public void merge(BloomKFilter that)
  {
    if (this != that && this.m == that.m && this.k == that.k) {
      this.bitSet.putAll(that.bitSet);
    } else {
      throw new IllegalArgumentException("BloomKFilters are not compatible for merging." +
                                         " this - " + this + " that - " + that);
    }
  }
1105448
public void merge(ConfigurationMetadata metadata) {
		for (ItemMetadata additionalItem : metadata.getItems()) {
			mergeItemMetadata(additionalItem);
		}
		for (ItemHint itemHint : metadata.getHints()) {
			add(itemHint);
		}
	}
516199
public static <T> void mergeFrom(byte[] data, int offset, int len, T message,
            Schema<T> schema, XMLInputFactory inFactory)
    {
        final ByteArrayInputStream in = new ByteArrayInputStream(data, offset, len);
        try
        {
            mergeFrom(in, message, schema, inFactory);
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
    }