Merges a list of multiple configuration objects into a single configuration object.<p>

@param configurations the list of configuration objects.<p>

@return the merged configuration object
320495
protected CmsADEConfigDataInternal mergeConfigurations(List<CmsADEConfigDataInternal> configurations) {

        if (configurations.isEmpty()) {
            return new CmsADEConfigDataInternal(null);
        }
        for (int i = 0; i < (configurations.size() - 1); i++) {
            configurations.get(i + 1).mergeParent(configurations.get(i));
        }
        CmsADEConfigDataInternal result = configurations.get(configurations.size() - 1);
        result.processModuleOrdering();
        return result;
    }
52617
static void merge(Map<ConfigurationKey, Object> original, Map<ConfigurationKey, Object> toMerge, String mergedSourceDescription) {
        for (Entry<ConfigurationKey, Object> entry : toMerge.entrySet()) {
            Object existing = original.get(entry.getKey());
            if (existing != null) {
                ConfigurationLogger.LOG.configurationKeyAlreadySet(entry.getKey().get(), existing, entry.getValue(), mergedSourceDescription);
            } else {
                original.put(entry.getKey(), entry.getValue());
            }
        }
    }
819426
public MediaTypes merge(final MediaTypes types) {
        final SortedSet<MediaType> set = new TreeSet<>();
        set.addAll(this.list);
        set.addAll(types.list);
        return new MediaTypes(set);
    }
824420
public void merge(SubjectAware subjectAware)
  {
    merged = true;

    String username = subjectAware.username();

    if (username.length() > 0)
    {
      this.username = username;
    }

    String password = subjectAware.password();

    if (password.length() > 0)
    {
      this.password = password;
    }

    String configuration = subjectAware.configuration();

    if (configuration.length() > 0)
    {
      this.configuration = configuration;
    }
  }
491797
@Override
  public void merge(MergeState mergeState) throws IOException {
    final List<Fields> fields = new ArrayList<>();
    final List<ReaderSlice> slices = new ArrayList<>();

    int docBase = 0;

    for (int readerIndex = 0; readerIndex < mergeState.fieldsProducers.length; readerIndex++) {
      final FieldsProducer f = mergeState.fieldsProducers[readerIndex];

      final int maxDoc = mergeState.maxDocs[readerIndex];
      f.checkIntegrity();
      slices.add(new ReaderSlice(docBase, maxDoc, readerIndex));
      fields.add(f);
      docBase += maxDoc;
    }

    Fields mergedFields = new MappedMultiFields(mergeState,
        new MultiFields(fields.toArray(Fields.EMPTY_ARRAY),
            slices.toArray(ReaderSlice.EMPTY_ARRAY)));
    write(mergedFields);
  }
764053
public MultiMap merge(MultiMap multiMap)
    {
        MultiMap result = new MultiMap();
        result.map.putAll(this.map);
        result.map.putAll(multiMap.map);
        return result;
    }
1357638
protected Configurations merge(Configurations other) {
		Set<Class<?>> mergedClasses = new LinkedHashSet<>(getClasses());
		mergedClasses.addAll(other.getClasses());
		return merge(mergedClasses);
	}
637101
private static Configuration merge(Configuration one, Configuration two) {
    if (one == null) {
      if (two == null) {
        return new Configuration();
      }
      return new Configuration(two);
    }

    Configuration c = new Configuration(one);

    if (two == null) {
      return c;
    }

    for (Map.Entry<String, String> entry : two) {
      c.set(entry.getKey(), entry.getValue());
    }

    return c;
  }
1137996
public static void mergeHadoopConf(JobConf jobConf) {
		// we have to load the global configuration here, because the HadoopInputFormatBase does not
		// have access to a Flink configuration object
		org.apache.flink.configuration.Configuration flinkConfiguration = GlobalConfiguration.loadConfiguration();

		Configuration hadoopConf = getHadoopConfiguration(flinkConfiguration);
		for (Map.Entry<String, String> e : hadoopConf) {
			if (jobConf.get(e.getKey()) == null) {
				jobConf.set(e.getKey(), e.getValue());
			}
		}
	}
651664
void merge(final Config that) {
        that.entrySet().parallelStream().forEach(e -> props.setProperty(e.getKey(), e.getValue()));
        setMode(that.getMode());
    }
1195461
def _merge_configs(configs):
    
    result = {
        u"contexts": [],
        u"users": [],
        u"clusters": [],
        u"current-context": None,
    }
    for config in configs:
        for k in {u"contexts", u"users", u"clusters"}:
            try:
                values = config.doc[k]
            except KeyError:
                pass
            else:
                result[k].extend(values)

        if result[u"current-context"] is None:
            try:
                result[u"current-context"] = config.doc[u"current-context"]
            except KeyError:
                pass

    return KubeConfig(result)
968816
public static <T> ArrayList<T> mergeLists(final T... array) {
        final ArrayList<T> retValue = new ArrayList<T>();
        Collections.addAll(retValue, array);
        return retValue;
    }
44842
final DynamoDBMapperConfig merge(final DynamoDBMapperConfig overrides) {
        return overrides == null || this == overrides ? this : builder().merge(this).merge(overrides).build();
    }
837408
public static List<Span> merge(List<Span> spans) {
    int length = spans.size();
    if (length <= 1) return spans;
    List<Span> result = new ArrayList<>(spans);
    Collections.sort(result, CLEANUP_COMPARATOR);

    // Let's cleanup any spans and pick the longest ID
    String traceId = result.get(0).traceId();
    for (int i = 1; i < length; i++) {
      String nextTraceId = result.get(i).traceId();
      if (traceId.length() != 32) traceId = nextTraceId;
    }

    // Now start any fixes or merging
    Span last = null;
    for (int i = 0; i < length; i++) {
      Span span = result.get(i);
      //String previousId = last.id();
      boolean spanShared = Boolean.TRUE.equals(span.shared());

      // Choose the longest trace ID
      Span.Builder replacement = null;
      if (span.traceId().length() != traceId.length()) {
        replacement = span.toBuilder().traceId(traceId);
      }

      EndpointTracker localEndpoint = null;
      while (i + 1 < length) {
        Span next = result.get(i + 1);
        String nextId = next.id();
        if (!nextId.equals(span.id())) break;

        if (localEndpoint == null) {
          localEndpoint = new EndpointTracker();
          localEndpoint.tryMerge(span.localEndpoint());
        }

        // This cautiously merges with the next span, if we think it was sent in multiple pieces.
        boolean nextShared = Boolean.TRUE.equals(next.shared());
        if (spanShared == nextShared && localEndpoint.tryMerge(next.localEndpoint())) {
          if (replacement == null) replacement = span.toBuilder();
          replacement.merge(next);

          // remove the merged element
          length--;
          result.remove(i + 1);
          continue;
        }
        break;
      }

      // Zipkin and B3 originally used the same span ID between client and server. Some
      // instrumentation are inconsistent about adding the shared flag on the server side. Since we
      // have the entire trace, and it is ordered client-first, we can correct a missing shared flag.
      if (last != null && last.id().equals(span.id())) {
        // Backfill missing shared flag as some instrumentation doesn't add it
        if (last.kind() == Span.Kind.CLIENT && span.kind() == Span.Kind.SERVER && !spanShared) {
          spanShared = true;
          if (replacement == null) replacement = span.toBuilder();
          replacement.shared(true);
        }

        if (spanShared && span.parentId() == null && last.parentId() != null) {
          // handle a shared RPC server span that wasn't propagated its parent span ID
          if (replacement == null) replacement = span.toBuilder();
          replacement.parentId(last.parentId());
        }
      }

      if (replacement != null) {
        span = replacement.build();
        result.set(i, span);
      }
      last = span;
    }

    return result;
  }
855657
@Override
	protected Properties mergeProperties() throws IOException {
		final PrefixedProperties myProperties = createProperties();
		if (localOverride) {
			loadProperties(myProperties);
		}

		if (localProperties != null) {
			for (int i = 0; i < localProperties.length; i++) {
				CollectionUtils.mergePropertiesIntoMap(localProperties[i], myProperties);
			}
		}

		if (!localOverride) {
			loadProperties(myProperties);
		}

		return myProperties;
	}
32150
@Nonnull
	public static Configuration createConfiguration(Properties properties) {
		final Configuration configuration = new Configuration();

		final Set<String> propertyNames = properties.stringPropertyNames();

		for (String propertyName : propertyNames) {
			configuration.setString(propertyName, properties.getProperty(propertyName));
		}

		return configuration;
	}
304736
@Override
    public void merge(JMSConnectionFactoryDefinition annotation, Class<?> instanceClass, Member member) throws InjectionException {

        if (member != null) {
            // ConnectionFactoryDefinition is a class-level annotation only.
            throw new IllegalArgumentException(member.toString());
        }

        interfaceName = mergeAnnotationValue(interfaceName, isXmlInterfaceNameSet, annotation.interfaceName(), JMSConnectionFactoryProperties.INTERFACE_NAME.getAnnotationKey(),
                                             JMSResourceDefinitionConstants.JMS_CONNECTION_FACTORY_INTERFACE);
        className = mergeAnnotationValue(className, isXmlClassNameSet, annotation.className(), JMSConnectionFactoryProperties.CLASS_NAME.getAnnotationKey(), "");
        resourceAdapter = mergeAnnotationValue(resourceAdapter, isXmlResourceAdapterSet, annotation.resourceAdapter(),
                                               JMSConnectionFactoryProperties.RESOURCE_ADAPTER.getAnnotationKey(),
                                               JMSResourceDefinitionConstants.DEFAULT_JMS_RESOURCE_ADAPTER);
        user = mergeAnnotationValue(user, isXMLUserSet, annotation.user(), JMSConnectionFactoryProperties.USER.getAnnotationKey(), "");
        password = mergeAnnotationValue(password, isXmlPasswordSet, annotation.password(), JMSConnectionFactoryProperties.PASSWORD.getAnnotationKey(), "");
        clientId = mergeAnnotationValue(clientId, isXmlClientIdSet, annotation.clientId(), JMSConnectionFactoryProperties.CLIENT_ID.getAnnotationKey(), "");
        properties = mergeAnnotationProperties(properties, xmlProperties, annotation.properties());
        transactional = mergeAnnotationBoolean(transactional, isXmlTransactionalSet, annotation.transactional(), JMSConnectionFactoryProperties.TRANSACTIONAL.getAnnotationKey(),
                                               JMSResourceDefinitionConstants.DEFAULT_TRANSACTIONAL_VALUE);
        description = mergeAnnotationValue(description, isXmlDescriptionSet, annotation.description(), JMSConnectionFactoryProperties.DESCRIPTION.getAnnotationKey(), ""); // d662109
        maxPoolSize = mergeAnnotationInteger(maxPoolSize, isXmlMaxPoolSizeSet, annotation.maxPoolSize(), JMSConnectionFactoryProperties.MAX_POOL_SIZE.getAnnotationKey(), -1, null);
        minPoolSize = mergeAnnotationInteger(minPoolSize, isXmlMinPoolSizeSet, annotation.minPoolSize(), JMSConnectionFactoryProperties.MIN_POOL_SIZE.getAnnotationKey(), -1, null);

    }