Replace the state of this object with the same object in some other state.
Used for to restore the before image if a transaction rolls back.

@param other  The object this object is to become a clone of.
494024
public void becomeCloneOf(ManagedObject other)
    {
        Anchor o = (Anchor)other;
        _rootStreamToken = o._rootStreamToken;
        _uniqueKeyTableToken = o._uniqueKeyTableToken;
    }
1023587
public boolean sameState(final DoubleAdder other) {
		return Double.compare(_sum, other._sum) == 0 &&
			Double.compare(_simpleSum, other._simpleSum) == 0 &&
			Double.compare(_compensation, other._compensation) == 0;
	}
907008
private void prepareForReuse(boolean reuse)
    {
        if(reuse)
        {
            // using clone to avoid ConcurentModificationException
            Iterator iter = ((List) mvOrderOfIds.clone()).iterator();
            while(iter.hasNext())
            {
                ObjectEnvelope mod = (ObjectEnvelope) mhtObjectEnvelopes.get(iter.next());
                if(!needsCommit || (mod.getModificationState() == StateOldClean.getInstance()
                        || mod.getModificationState().isTransient()))
                {
                    // nothing to do
                }
                else
                {
                    mod.setModificationState(mod.getModificationState().markClean());
                }
            }
        }
    }
380882
public void becomeCloneOf(ManagedObject other)
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "becomeCloneOf"
                        , new Object[] { other }
                            );

        TreeMap otherTree = (TreeMap) other;
        root = otherTree.root;
        size = otherTree.size;
        // Transient state is dealt with by preCommit() and preBackout() methods of Entry.
        if (!backingOut) { // Was transient state corrected in preBackout?
            availableSize = otherTree.availableSize;
        } // if(!backingOut).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "becomeCloneOf"
                            );
    }
199945
public Curies mergeWith(final Curies other) {
        final Curies merged = copyOf(this);
        other.curies.forEach(merged::register);
        return merged;
    }
382358
function(other) {
      if (!other) {
        return;
      }
      
      // This does the inverse of _mergeMagicFields.
      this.id = other.id;
      this.createdAt = other.createdAt;
      this.updatedAt = other.updatedAt;

      this._copyServerData(other._serverData);

      this._hasData = true;
    }
752754
@Override
    public void copyFrom(Frame<IsNullValue> other) {
        super.copyFrom(other);
        decision = ((IsNullValueFrame) other).decision;
        if (trackValueNumbers) {
            knownValueMap = Util.makeSmallHashMap(((IsNullValueFrame) other).knownValueMap);
        }
    }
966309
def __store_other(self, o, method_name, member):
        
        self.__store__[ method_name ] = eval( "o." + method_name )
        self.__store__[ method_name[0].lower() + method_name[1:] ] = eval( "o." + method_name )
1281426
protected synchronized void copy(Writable other) {
    if (other != null) {
      try {
        DataOutputBuffer out = new DataOutputBuffer();
        other.write(out);
        DataInputBuffer in = new DataInputBuffer();
        in.reset(out.getData(), out.getLength());
        readFields(in);
        
      } catch (IOException e) {
        throw new IllegalArgumentException("map cannot be copied: " +
            e.getMessage());
      }
      
    } else {
      throw new IllegalArgumentException("source map cannot be null");
    }
  }
1113104
public void copyFrom(XElement other) {
        content = other.content;
        userObject = other.userObject;
        attributes.putAll(other.attributes);
        for (XElement c : other.children) {
            add(c.copy());
        }
    }
313238
def _swap(self, other):
        
        self.__dict__, other.__dict__ = other.__dict__, self.__dict__
1214436
public void union(final HLL other) {
        // TODO: verify HLLs are compatible
        final HLLType otherType = other.getType();

        if(type.equals(otherType)) {
            homogeneousUnion(other);
            return;
        } else {
            heterogenousUnion(other);
            return;
        }
    }
491099
def copy_from(self, other_state):
    """"""
    for prop in self.properties().values():
      setattr(self, prop.name, getattr(other_state, prop.name))
591209
def difference(self, other):
        

        obj = self._clone()
        obj.difference_update(other)
        return obj
528388
def update(self, other, inplace=True):
        
        return self.append(other, inplace=inplace, resize=False)
590580
function (internalInstance, nextElement, transaction, context) {
    var prevElement = internalInstance._currentElement;

    if (nextElement === prevElement && context === internalInstance._context) {
      // Since elements are immutable after the owner is rendered,
      // we can do a cheap identity compare here to determine if this is a
      // superfluous reconcile. It's possible for state to be mutable but such
      // change should trigger an update of the owner which would recreate
      // the element. We explicitly check for the existence of an owner since
      // it's possible for an element created outside a composite to be
      // deeply mutated and reused.

      // TODO: Bailing out early is just a perf optimization right?
      // TODO: Removing the return statement should affect correctness?
      return;
    }

    if (process.env.NODE_ENV !== 'production') {
      if (internalInstance._debugID !== 0) {
        ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
      }
    }

    var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);

    if (refsChanged) {
      ReactRef.detachRefs(internalInstance, prevElement);
    }

    internalInstance.receiveComponent(nextElement, transaction, context);

    if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
      transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
    }

    if (process.env.NODE_ENV !== 'production') {
      if (internalInstance._debugID !== 0) {
        ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
      }
    }
  }
825516
public void mergeWith(BlockType other) {
        if (this.isTop() || other.isBottom()) {
            copyFrom(other);
        } else if (isValid()) {
            // To merge, we take the common prefix
            int pfxLen = Math.min(this.depth, other.depth);
            int commonLen;
            for (commonLen = 0; commonLen < pfxLen; ++commonLen) {
                if (this.get(commonLen) != other.get(commonLen)) {
                    break;
                }
            }
            this.depth = commonLen;
        }
    }