Merge the source skeleton with this one.
The result will be that this skeleton has all of its
original bones and all the bones in the new skeleton.

@param newSkel skeleton to merge with this one
497508
public void merge(GVRSkeleton newSkel)
    {
        int numBones = getNumBones();
        List<Integer> parentBoneIds = new ArrayList<Integer>(numBones + newSkel.getNumBones());
        List<String> newBoneNames = new ArrayList<String>(newSkel.getNumBones());
        List<Matrix4f> newMatrices = new ArrayList<Matrix4f>(newSkel.getNumBones());
        GVRPose oldBindPose = getBindPose();
        GVRPose curPose = getPose();

        for (int i = 0; i < numBones; ++i)
        {
            parentBoneIds.add(mParentBones[i]);
        }
        for (int j = 0; j < newSkel.getNumBones(); ++j)
        {
            String boneName = newSkel.getBoneName(j);
            int boneId = getBoneIndex(boneName);
            if (boneId < 0)
            {
                int parentId = newSkel.getParentBoneIndex(j);
                Matrix4f m = new Matrix4f();

                newSkel.getBindPose().getLocalMatrix(j, m);
                newMatrices.add(m);
                newBoneNames.add(boneName);
                if (parentId >= 0)
                {
                    boneName = newSkel.getBoneName(parentId);
                    parentId = getBoneIndex(boneName);
                }
                parentBoneIds.add(parentId);
            }
        }
        if (parentBoneIds.size() == numBones)
        {
            return;
        }
        int n = numBones +  parentBoneIds.size();
        int[] parentIds = Arrays.copyOf(mParentBones, n);
        int[] boneOptions = Arrays.copyOf(mBoneOptions, n);
        String[] boneNames = Arrays.copyOf(mBoneNames, n);

        mBones = Arrays.copyOf(mBones, n);
        mPoseMatrices =  new float[n * 16];
        for (int i = 0; i < parentBoneIds.size(); ++i)
        {
            n = numBones + i;
            parentIds[n] = parentBoneIds.get(i);
            boneNames[n] = newBoneNames.get(i);
            boneOptions[n] = BONE_ANIMATE;
        }
        mBoneOptions = boneOptions;
        mBoneNames = boneNames;
        mParentBones = parentIds;
        mPose = new GVRPose(this);
        mBindPose = new GVRPose(this);
        mBindPose.copy(oldBindPose);
        mPose.copy(curPose);
        mBindPose.sync();
        for (int j = 0; j < newSkel.getNumBones(); ++j)
        {
            mBindPose.setLocalMatrix(numBones + j, newMatrices.get(j));
            mPose.setLocalMatrix(numBones + j, newMatrices.get(j));
        }
        setBindPose(mBindPose);
        mPose.sync();
        updateBonePose();
    }
560390
def merge(self, ontologies):
        
        if self.xref_graph is None:
            self.xref_graph = nx.MultiGraph()
        logger.info("Merging source: {} xrefs: {}".format(self, len(self.xref_graph.edges())))
        for ont in ontologies:
            logger.info("Merging {} into {}".format(ont, self))
            g = self.get_graph()
            srcg = ont.get_graph()
            for n in srcg.nodes():
                g.add_node(n, **srcg.node[n])
            for (o,s,m) in srcg.edges(data=True):
                g.add_edge(o,s,**m)
            if ont.xref_graph is not None:
                for (o,s,m) in ont.xref_graph.edges(data=True):
                    self.xref_graph.add_edge(o,s,**m)
1219580
void merge(MtasSolrMtasResult newItem) throws IOException {
    HashMap<MtasDataCollector<?, ?>, MtasDataCollector<?, ?>> map = new HashMap<>();
    if (newItem.dataCollector.withTotal()) {
      dataCollector.setWithTotal();
    }
    dataCollector.merge(newItem.dataCollector, map, true);
    if (newItem.functionData != null) {
      if (functionData == null) {
        functionData = new HashMap<>();
      }
      for (MtasDataCollector<?, ?> keyCollector : newItem.functionData
          .keySet()) {
        if (map.containsKey(keyCollector)) {
          // compute mapped key
          MtasDataCollector<?, ?> newKeyCollector = keyCollector;
          while (map.containsKey(newKeyCollector)) {
            newKeyCollector = map.get(keyCollector);
          }
          if (functionData.containsKey(newKeyCollector)) {
            HashMap<String, MtasSolrMtasResult> tmpList = functionData
                .get(newKeyCollector);
            for (String functionKey : newItem.functionData.get(keyCollector)
                .keySet()) {
              if (tmpList.containsKey(functionKey)) {
                tmpList.get(functionKey).merge(
                    newItem.functionData.get(keyCollector).get(functionKey));
              } else {
                tmpList.put(functionKey,
                    newItem.functionData.get(keyCollector).get(functionKey));
              }
            }
          } else {
            functionData.put(newKeyCollector,
                newItem.functionData.get(keyCollector));
          }
        }
      }
    }
  }
105280
protected boolean mergeSegments() {
		// can't merge a single line
		if( splits.size <= 2 )
			return false;

		boolean change = false;
		work.reset();

		// first point is always at the start
		work.add(splits.data[0]);

		for( int i = 0; i < splits.size-2; i++ ) {
			if( selectSplitBetween(splits.data[i],splits.data[i+2]) < 0 ) {
				// merge the two lines by not adding it
				change = true;
			} else {
				work.add(splits.data[i + 1]);
			}
		}

		// and end
		work.add(splits.data[splits.size-1]);

		// swap the two lists
		GrowQueue_I32 tmp = work;
		work = splits;
		splits = tmp;

		return change;
	}
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);
    }
874463
public void merge(final KllFloatsSketch other) {
    if ((other == null) || other.isEmpty()) { return; }
    if (m_ != other.m_) {
      throw new SketchesArgumentException("incompatible M: " + m_ + " and " + other.m_);
    }
    final long finalN = n_ + other.n_;
    for (int i = other.levels_[0]; i < other.levels_[1]; i++) {
      update(other.items_[i]);
    }
    if (other.numLevels_ >= 2) {
      mergeHigherLevels(other, finalN);
    }
    if (Float.isNaN(minValue_) || (other.minValue_ < minValue_)) { minValue_ = other.minValue_; }
    if (Float.isNaN(maxValue_) || (other.maxValue_ > maxValue_)) { maxValue_ = other.maxValue_; }
    n_ = finalN;
    assertCorrectTotalWeight();
    if (other.isEstimationMode()) {
      minK_ = min(minK_, other.minK_);
    }
  }
1171835
@Override
    public T merge(Archive<?> source) throws IllegalArgumentException {
        this.getArchive().merge(source);
        return covarientReturn();
    }
627958
public void merge(Mutation<E,K> m) {
        Preconditions.checkNotNull(m);

        if (null != m.additions) {
            if (null == additions) additions = m.additions;
            else additions.addAll(m.additions);
        }

        if (null != m.deletions) {
            if (null == deletions) deletions = m.deletions;
            else deletions.addAll(m.deletions);
        }
    }
78861
@Override
    public T merge(final Archive<?> source, final ArchivePath path) throws IllegalArgumentException {
        Validate.notNull(source, "No source archive was specified");
        Validate.notNull(path, "No path was specified");

        return merge(source, path, Filters.includeAll());
    }
1155387
private void mergeTree(Block targetTree, Block sourceTree)
    {
        for (Block block : sourceTree.getChildren()) {
            // Check if the current block exists in the target tree at the same place in the tree
            int pos = indexOf(targetTree.getChildren(), block);
            if (pos > -1) {
                Block foundBlock = targetTree.getChildren().get(pos);
                mergeTree(foundBlock, block);
            } else {
                targetTree.addChild(block);
            }
        }
    }
796958
public void mergeWith(Core o) {
    o.num = this.num = (num < o.num ? num : o.num);
  }
1369423
function merge (target, source) {
  if (isMergeable(source)) {
    var keys = Object.keys(source);
    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];
      var sourceSetting = source[key];
      var targetSetting = target[key];

      if (isMergeable(sourceSetting)) {
        // It's a nested object, so merge it recursively
        target[key] = merge(targetSetting || {}, sourceSetting);
      }
      else if (sourceSetting !== undefined) {
        // It's a scalar value, function, or array. No merging necessary. Just overwrite the target value.
        target[key] = sourceSetting;
      }
    }
  }
  return target;
}
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;
    }
  }
592734
public static void mergeNodeChildren(TreeNode node) {
        DefaultMutableTreeNode masterNode = (DefaultMutableTreeNode) node;

        // The rules are there are no rules. Nothing else needs to be done
        // except for merging through the children
        for (int i = 0; i < masterNode.getChildCount(); i++) {
            DefaultMutableTreeNode child = (DefaultMutableTreeNode) masterNode.getChildAt(i);

            if (!child.isLeaf()) {
                MergeHelpUtilities.mergeNodeChildren(DEFAULT_MERGE_TYPE, child);
            }
        }
    }
695007
public function mergeSource(SourceInterface $source): void
    {
        if (array_key_exists($source->sourceId(), $this->sources)) {
            unset($this->sources[$source->sourceId()]);
        } else {
            $this->newSources[$source->sourceId()] = $source;
        }
        $this->sources[$source->sourceId()] = $source;
    }
814629
public CSSStyleSheetImpl merge() {
        final CSSStyleSheetImpl merged = new CSSStyleSheetImpl();
        final CSSRuleListImpl cssRuleList = new CSSRuleListImpl();
        final Iterator<CSSStyleSheetImpl> it = getCSSStyleSheets().iterator();
        while (it.hasNext()) {
            final CSSStyleSheetImpl cssStyleSheet = it.next();
            final CSSMediaRuleImpl cssMediaRule = new CSSMediaRuleImpl(merged, null, cssStyleSheet.getMedia());
            cssMediaRule.setRuleList(cssStyleSheet.getCssRules());
            cssRuleList.add(cssMediaRule);
        }
        merged.setCssRules(cssRuleList);
        merged.setMediaText("all");
        return merged;
    }
1299899
public static void mergeStringList(
      final List<String> destinationList, final List<String> sourceList) {
    if (sourceList != null) {
      for (String item : sourceList) {
        if (!destinationList.contains(item)) {
          destinationList.add(item);
        }
      }
    }
  }