Merge another ClassAnalysis object's result into this instance.

@param ClassAnalysis $other The other object instance.
494887
public function mergeAnalysis(
        ClassAnalysis $other)
    {
        $this->bad_definitions = array_merge_recursive(
            $this->bad_definitions,
            $other->bad_definitions
        );
        $this->missing_definitions = array_merge_recursive(
            $this->missing_definitions,
            $other->missing_definitions
        );
    }
411390
public function gt($other)
    {
        if (!($other instanceof self)) {
            $other = new BigInt($other);
        }
        return ($this->compare($other) > 0);
    }
621017
public function merge(Intent $another)
    {
        $this->actions = array_merge($this->actions, $another->getActions());
    }
183873
private function mergeFacetFieldCounts($other)
    {
        $facetFields = (array)$other->facet_counts->facet_fields;

        foreach($facetFields as $facetName => $facetCounts) {
            $facetCounts = (array)$facetCounts;

            foreach($facetCounts as $facetId => $facetCount) {
                if (isset($this->facet_counts->facet_fields->$facetName->$facetId)) {
                    $this->facet_counts->facet_fields->$facetName->$facetId = max(
                        $this->facet_counts->facet_fields->$facetName->$facetId,
                        $facetCount
                    );
                } else {
                    $this->facet_counts->facet_fields->$facetName->$facetId = $facetCount;
                }
            }
        }

        if (isset($other->facet_counts->facet_ranges)) {

            $facetRanges = (array)$other->facet_counts->facet_ranges;

            foreach ($facetRanges as $facetName => $facetCounts) {
                $facetCounts = (array)$facetCounts->counts;

                if (!isset($this->facet_counts)) {
                    $this->facet_counts = new \stdClass();
                }
                if (!isset($this->facet_counts->facet_ranges)) {
                    $this->facet_counts->facet_ranges = new \stdClass();
                }
                if (!isset($this->facet_counts->facet_ranges->$facetName)) {
                    $this->facet_counts->facet_ranges->$facetName = new \stdClass();
                    $this->facet_counts->facet_ranges->$facetName->counts = new \stdClass();
                }

                foreach ($facetCounts as $facetId => $facetCount) {
                    if (isset($this->facet_counts->facet_ranges->$facetName->counts->$facetId)) {
                        $this->facet_counts->facet_ranges->$facetName->counts->$facetId = max(
                            $this->facet_counts->facet_ranges->$facetName->counts->$facetId,
                            $facetCount
                        );
                    } else {
                        $this->facet_counts->facet_ranges->$facetName->counts->$facetId = $facetCount;
                    }
                }
            }
        }

        if (isset($other->facet_counts->facet_intervals)) {

            $facetIntervals = (array)$other->facet_counts->facet_intervals;

            foreach ($facetIntervals as $facetName => $facetCounts) {
                $facetCounts = (array)$facetCounts;

                if (!isset($this->facet_counts)) {
                    $this->facet_counts = new \stdClass();
                }
                if (!isset($this->facet_counts->facet_intervals)) {
                    $this->facet_counts->facet_intervals = new \stdClass();
                }
                if (!isset($this->facet_counts->facet_intervals->$facetName)) {
                    $this->facet_counts->facet_intervals->$facetName = new \stdClass();
                }

                foreach ($facetCounts as $facetId => $facetCount) {
                    if (isset($this->facet_counts->facet_intervals->$facetName->$facetId)) {
                        $this->facet_counts->facet_intervals->$facetName->$facetId = max(
                            $this->facet_counts->facet_intervals->$facetName->$facetId,
                            $facetCount
                        );
                    } else {
                        $this->facet_counts->facet_intervals->$facetName->$facetId = $facetCount;
                    }
                }
            }
        }
    }
914366
public function copyTo(LayerManager $other) 
    {
        $other->color = $this->color;
        
        $layer = $this->topLayer;
        $previousCopy = null;
        
        while ($layer !== null) {
            $copy = new Layer(
                $layer->polygonId,
                $layer->color,
                $layer->winding,
                $layer->windingRule
                );
            
            if ($previousCopy === null) {
                $other->topLayer = $copy;
            }
            else {
                $previousCopy->nextLayer = $copy;
            }
            
            $previousCopy = $copy;
            $layer = $layer->nextLayer;
        }
    }
918159
function add( $other ) {
		if ( $other instanceof self ) {
			$this->parts = array_merge( $this->parts, $other->parts );
		} else {
			$this->parts[] = $other;
		}
	}
619822
def merge(self, other):
        
        Stats.merge(self, other)
        self.changes += other.changes
1099434
protected function deepMergeInto(Hash $into, Hash $other)
    {
        foreach ($other as $key => $value) {
            if (is_object($value)
                && $value instanceof self
                && $into->hasKey($key)
            ) {
                $value = $this->deepMergeInto($into[$key], $value);
            }

            $into[$key] = $value;
        }

        return $into;
    }
1218841
public function combine($another)
    {
        if (is_a($another, DC_DataHolder::getKlass())) {
            // debug_message("entering combine...");
            // debug_var_dump("another", $another);
            //identifier
            if (empty($this->identifier)) {
                debug_message("DC_DataHolder::identifier should not be empty!!");
                $this->identifier = $another->identifier;
            } elseif (strcmp(substr($this->identifier, - strlen($another->identifier)), $another->identifier) !== 0) {
                debug_var_dump('comparison', strcmp(substr($this->identifier, - strlen($another->identifier)), $another->identifier));
                error_log("found a different identifier for this element ".$this->identifier." != ".$another->identifier);
                return;
            }
            //continue with other elements
            $this->addElement('contributor', $another);
            $this->addElement('coverage', $another);
            $this->addElement('creator', $another);
            $this->addElement('date_', $another);
            $this->addElement('description', $another);
            $this->addElement('format_', $another);
            $this->addElement('language', $another);
            $this->addElement('publisher', $another);
            $this->addElement('relation', $another);
            $this->addElement('rights', $another);
            $this->addElement('source', $another);
            $this->addElement('subject', $another);
            $this->addElement('title', $another);
            $this->addElement('type_', $another);
        }
    }
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);
    }
  }
1324242
public void combine(SpdDouble other) {
        if (other == null)
            return;
        if (stat.isEnabled() && other.isEnabled())
            stat.combine((DoubleStatisticImpl) other.getStatistic());
    }
437990
def merge(cls, *others):
        
        for other in others:
            for k, v in other:
                setattr(cls, k, BoundValue(cls, k, v.value))
715079
@Override
    public ClassContext analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor) throws CheckedAnalysisException {

        JavaClass javaClass = analysisCache.getClassAnalysis(JavaClass.class, descriptor);
        ClassContext classContext = new ClassContext(javaClass, AnalysisContext.currentAnalysisContext());
        return classContext;
    }
149651
public function merge(UnitOfWork $other)
    {
        if (!$this->uniqueId->equals($other->uniqueId)) {
            throw new \InvalidArgumentException(
                'Cannot merge units with different UIDs'
            );
        }

        $this->workload = new Workload(
            sprintf(
                '%s%s',
                $this->getQuery(),
                $other->getQuery()
            )
        );
    }
995475
protected function mergeProperty(Result $otherResult, string $getterName, string $adderName)
    {
        foreach ($otherResult->$getterName() as $messageInOtherResult) {
            $this->$adderName($messageInOtherResult);
        }
    }
1075215
public function mergeWith(Parsed $other)
    {
        $mergeMethod = Translations::MERGE_ADD | Translations::MERGE_PLURAL;
        if ($other->sourceStrings !== null) {
            if ($this->sourceStrings === null) {
                $this->sourceStrings = $other->sourceStrings;
            } else {
                $this->sourceStrings->mergeWith($other->sourceStrings, $mergeMethod);
            }
        }
        foreach ($other->translations as $key => $data) {
            if (isset($this->translations[$key])) {
                $this->translations[$key][1]->mergeWith($data[1], $mergeMethod);
            } else {
                $this->translations[$key] = $data;
            }
        }
    }
250385
def merge(self, other):
        """"""
        log.debug('Merging: %s and %s' % (self.serialize(), other.serialize()))
        for k in self.keys():
            for new_item in other[k]:
                if new_item not in self[k]:
                    self[k].append(new_item)
        log.debug('Result: %s' % self.serialize())
        return self