Perform the merge

@param stereotypeAnnotations The stereotype annotations
343944
protected void merge(Set<Annotation> stereotypeAnnotations) {
        final MetaAnnotationStore store = manager.getServices().get(MetaAnnotationStore.class);
        for (Annotation stereotypeAnnotation : stereotypeAnnotations) {
            // Retrieve and merge all metadata from stereotypes
            StereotypeModel<?> stereotype = store.getStereotype(stereotypeAnnotation.annotationType());
            if (stereotype == null) {
                throw MetadataLogger.LOG.stereotypeNotRegistered(stereotypeAnnotation);
            }
            if (stereotype.isAlternative()) {
                alternative = true;
            }
            if (stereotype.getDefaultScopeType() != null) {
                possibleScopeTypes.add(stereotype.getDefaultScopeType());
            }
            if (stereotype.isBeanNameDefaulted()) {
                beanNameDefaulted = true;
            }
            this.stereotypes.add(stereotypeAnnotation.annotationType());
            // Merge in inherited stereotypes
            merge(stereotype.getInheritedStereotypes());
        }
    }
49778
public void setAnnotations(java.util.Map<String, java.util.List<ValueWithServiceIds>> annotations) {
        this.annotations = annotations;
    }
883568
public void mergeFrom(final FieldSet<FieldDescriptorType> other) {
    for (int i = 0; i < other.fields.getNumArrayEntries(); i++) {
      mergeFromField(other.fields.getArrayEntryAt(i));
    }
    for (final Map.Entry<FieldDescriptorType, Object> entry :
             other.fields.getOverflowEntries()) {
      mergeFromField(entry);
    }
  }
532951
@Override
	protected V mergeState(V a, V b) throws Exception {
		return reduceTransformation.apply(a, b);
	}
1011571
public void merge(SrcTree srcTree) {
        mergeTestClassTable(srcTree.rootClassTable, rootClassTable);
        mergeTestClassTable(srcTree.subClassTable, subClassTable);
        mergeTestMethodTable(srcTree.rootMethodTable, rootMethodTable);
        mergeTestMethodTable(srcTree.subMethodTable, subMethodTable);
        mergeTestFieldTable(srcTree.fieldTable, fieldTable);
    }
954935
public void merge(Map<Address, View> views) {
        if(views == null || views.isEmpty()) {
            log.warn("the views passed with the MERGE event were empty (or null); ignoring MERGE event");
            return;
        }

        if(View.sameViews(views.values())) {
            log.debug("MERGE event is ignored because of identical views: %s", Util.printListWithDelimiter(views.values(), ", "));
            return;
        }

        if(isMergeInProgress()) {
            log.trace("%s: merge is already running (merge_id=%s)", gms.local_addr, merge_id);
            return;
        }

        Address merge_leader=determineMergeLeader(views);
        if(merge_leader == null)
            return;

        if(merge_leader.equals(gms.local_addr)) {
            log.debug("%s: I will be the merge leader. Starting the merge task. Views: %s", gms.local_addr, views);
            merge_task.start(views);
        }
        else
            log.trace("%s: I'm not the merge leader, waiting for merge leader (%s) to start merge", gms.local_addr, merge_leader);
    }
136627
public boolean merge(AbstractTransition another) {
        if (!isCompatible(another)) {
            return false;
        }
        if (another.mId != null) {
            if (mId == null) {
                mId = another.mId;
            } else {
                StringBuilder sb = new StringBuilder(mId.length() + another.mId.length());
                sb.append(mId);
                sb.append("_MERGED_");
                sb.append(another.mId);
                mId = sb.toString();
            }
        }
        mUpdateStateAfterUpdateProgress |= another.mUpdateStateAfterUpdateProgress;
        mSetupList.addAll(another.mSetupList);
        Collections.sort(mSetupList, new Comparator<S>() {
            @Override
            public int compare(S lhs, S rhs) {
                if (lhs instanceof AbstractTransitionBuilder && rhs instanceof AbstractTransitionBuilder) {
                    AbstractTransitionBuilder left = (AbstractTransitionBuilder) lhs;
                    AbstractTransitionBuilder right = (AbstractTransitionBuilder) rhs;
                    float startLeft = left.mReverse ? left.mEnd : left.mStart;
                    float startRight = right.mReverse ? right.mEnd : right.mStart;
                    return (int) ((startRight - startLeft) * 1000);
                }
                return 0;
            }
        });

        return true;
    }
1156487
protected void addRepeatableStereotype(List<String> parents, String stereotype, io.micronaut.core.annotation.AnnotationValue annotationValue) {
        Map<String, Map<CharSequence, Object>> allStereotypes = getAllStereotypes();
        List<String> annotationList = getAnnotationsByStereotypeInternal(stereotype);
        for (String parentAnnotation : parents) {
            if (!annotationList.contains(parentAnnotation)) {
                annotationList.add(parentAnnotation);
            }
        }

        addRepeatableInternal(stereotype, annotationValue, allStereotypes);
    }
800203
public void merge(String mergeResultPath, String... resultPaths){
        try{
            Map<String, AtomicInteger> map = new ConcurrentHashMap<>();
            for(String resultPath : resultPaths) {
                Files.lines(Paths.get(resultPath)).forEach(line -> {
                    String[] attrs = line.split("\\s+");
                    if (attrs != null && attrs.length == 2) {
                        statistics(attrs[0], Integer.parseInt(attrs[1]), map);
                    }
                });
            }
            dump(map, mergeResultPath);
        }catch (Exception e){
            LOGGER.error("merge error!", e);
        }
    }
45523
@Override
    public void merge(EvaluationBinary other) {
        if (other.countTruePositive == null) {
            //Other is empty - no op
            return;
        }

        if (countTruePositive == null) {
            //This evaluation is empty -> take results from other
            this.countTruePositive = other.countTruePositive;
            this.countFalsePositive = other.countFalsePositive;
            this.countTrueNegative = other.countTrueNegative;
            this.countFalseNegative = other.countFalseNegative;
            this.rocBinary = other.rocBinary;
        } else {
            if (this.countTruePositive.length != other.countTruePositive.length) {
                throw new IllegalStateException("Cannot merge EvaluationBinary instances with different sizes. This "
                                + "size: " + this.countTruePositive.length + ", other size: "
                                + other.countTruePositive.length);
            }

            //Both have stats
            addInPlace(this.countTruePositive, other.countTruePositive);
            addInPlace(this.countTrueNegative, other.countTrueNegative);
            addInPlace(this.countFalsePositive, other.countFalsePositive);
            addInPlace(this.countFalseNegative, other.countFalseNegative);

            if (this.rocBinary != null) {
                this.rocBinary.merge(other.rocBinary);
            }
        }
    }
718878
public void merge(ExtractionResult extractionResult) {
		for (Result result : extractionResult.results) {
			add(result.getObject(), result.getResultName());
		}
	}
1169935
private void mergeMappings(TypeMap<?, ?> destinationMap) {
    for (Mapping mapping : destinationMap.getMappings()) {
      InternalMapping internalMapping = (InternalMapping) mapping;
      mergedMappings.add(internalMapping.createMergedCopy(
          propertyNameInfo.getSourceProperties(), propertyNameInfo.getDestinationProperties()));
    }
  }
85598
public void setAttributeDefinitions(java.util.Collection<AttributeDefinition> attributeDefinitions) {
        if (attributeDefinitions == null) {
            this.attributeDefinitions = null;
            return;
        }

        this.attributeDefinitions = new java.util.ArrayList<AttributeDefinition>(attributeDefinitions);
    }
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;
    }
  }
602446
public final void addAnnotations(final List<SgAnnotation> annotations) {
        if (annotations == null) {
            throw new IllegalArgumentException("The argument 'annotations' cannot be NULL!");
        }
        this.annotations.addAll(annotations);
    }
1205063
public static Multimap<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, EnhancedAnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) {
        Set<Annotation> rawBindings = clazz.getMetaAnnotations(InterceptorBinding.class);
        Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), true, false);
        Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>();
        inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), false, true));
        for (Class<? extends Annotation> annotation : stereotypes) {
            inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true));
        }
        try {
            return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations);
        } catch (DeploymentException e) {
            throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass()));
        }
    }
783724
void addAnnotations(final AnnotationInfoList packageAnnotations) {
        // Currently only class annotations are used in the package-info.class file
        if (packageAnnotations != null && !packageAnnotations.isEmpty()) {
            if (this.annotationInfo == null) {
                this.annotationInfo = new AnnotationInfoList(packageAnnotations);
            } else {
                this.annotationInfo.addAll(packageAnnotations);
            }
        }
    }