This does actual copy. It should be called only when we hold locks on both this and other
objects
423728
private void doCopy(
      final int offset, final MemoryChunk other, final int otherOffset, final int count) {
    if (!(other instanceof NativeMemoryChunk)) {
      throw new IllegalArgumentException("Cannot copy two incompatible MemoryChunks");
    }
    Preconditions.checkState(!isClosed());
    Preconditions.checkState(!other.isClosed());
    MemoryChunkUtil.checkBounds(offset, other.getSize(), otherOffset, count, mSize);
    nativeMemcpy(other.getNativePtr() + otherOffset, mNativePtr + offset, count);
  }
471390
def initialize_copy( original_obj )
      @base_point = original_obj.base_point.dup
      @u_vector = original_obj.u_vector.dup
      @v_vector = original_obj.v_vector.dup
    end
1053235
def copy(self, deep=False, name=None):
        
        if deep:
            other = deepcopy(self)
        else:
            other = copy(self)

        if hasattr(self, 'name'):
            other.name = get_default(name, self.name + '_copy')

        return other
123927
public void copyFrom(StateSet other) {
        this.isTop = other.isTop;
        this.isBottom = other.isBottom;
        this.onExceptionPath = other.onExceptionPath;
        this.stateMap.clear();
        for (State state : other.stateMap.values()) {
            State dup = state.duplicate();
            this.stateMap.put(dup.getObligationSet(), dup);
        }
    }
613567
public void copyFrom(PointerCoords other) {
        final long bits = other.mPackedAxisBits;
        mPackedAxisBits = bits;
        if (bits != 0) {
            final float[] otherValues = other.mPackedAxisValues;
            final int count = Long.bitCount(bits);
            float[] values = mPackedAxisValues;
            if (values == null || count > values.length) {
                values = new float[otherValues.length];
                mPackedAxisValues = values;
            }
            System.arraycopy(otherValues, 0, values, 0, count);
        }

        x = other.x;
        y = other.y;
        pressure = other.pressure;
        size = other.size;
        touchMajor = other.touchMajor;
        touchMinor = other.touchMinor;
        toolMajor = other.toolMajor;
        toolMinor = other.toolMinor;
        orientation = other.orientation;
    }
122105
def copy
    copy = self.clone #Currently, we overwrite everything anyway, but we may add some clonable attributes later.
    #Make a deep copy of all objects.
    copy.instance_eval {@objects = {}}
    self.objects.each {|object| copy.add_object(object.copy)}
    #Make a deep copy of all environmental_factors.
    copy.clear_environmental_factors
    self.environmental_factors.each {|environmental_factor| copy.add_environmental_factor(environmental_factor)}
    copy
  end
822272
function copy() {
  var result = {}
    , depth = 2
    , seen = [];

  (function worker() {
    each(array(arguments), function each(obj) {
      for (var prop in obj) {
        if (hasOwn.call(obj, prop) && !~index(seen, obj[prop])) {
          if (type(obj[prop]) !== 'object' || !depth) {
            result[prop] = obj[prop];
            seen.push(obj[prop]);
          } else {
            depth--;
            worker(result[prop], obj[prop]);
          }
        }
      }
    });
  }).apply(null, arguments);

  return result;
}
1043332
@Override
    public void copyFrom(final CopyFrom obj) {
        final GeoRSSModule geoRSSModule = (GeoRSSModule) obj;
        geometry = geoRSSModule.getGeometry();
        try {
            geometry = (AbstractGeometry) geometry.clone();
        } catch (final CloneNotSupportedException ex) {
            LOG.error("Error", ex);
        }
    }
844881
def copy(self, sleep=_unset, stop=_unset, wait=_unset,
             retry=_unset, before=_unset, after=_unset, before_sleep=_unset,
             reraise=_unset):
        """"""
        if before_sleep is _unset:
            before_sleep = self.before_sleep
        return self.__class__(
            sleep=self.sleep if sleep is _unset else sleep,
            stop=self.stop if stop is _unset else stop,
            wait=self.wait if wait is _unset else wait,
            retry=self.retry if retry is _unset else retry,
            before=self.before if before is _unset else before,
            after=self.after if after is _unset else after,
            before_sleep=before_sleep,
            reraise=self.reraise if after is _unset else reraise,
        )
784569
def copy(self):
        ""
        other = _ChainedHashAlgorithm(self._algorithms)
        other._hobj = deepcopy(self._hobj)
        other._fobj = deepcopy(self._fobj)
        return other
906408
def copy(self):
        """"""
        return self.__class__(self._key, self._load, self._iteritems())
7975
function copy(source, destination, callback) {
  cp(source, destination, {overwrite: true}, function done(err) {
    if (err) callback(err)
    else callback()
  })
}
1180791
public void copy(Copier aFrom)
   {
      if(aFrom == null)
         return;
      
      Nameable from = (Nameable)aFrom;
      this.name = from.getName();
   }
80454
def copy(self):
        
        new = self.__class__()
        new.__dict__ = dict(self.__dict__)
        return new
189135
function copy(obj) {
  if (obj == null) {
    return obj;
  }

  if (array(obj)) {
    return obj.slice();
  } else if (plainObject(obj)) {
    return clone(obj);
  } else {
    return obj;
  }
}
1221876
def copy(self):
        """"""
        return self.__class__(self, key=self._key, load=self._load)
481799
def copy_object(self, obj, new_container, new_obj_name=None,
            content_type=None):
        
        return self.manager.copy_object(self, obj, new_container,
                new_obj_name=new_obj_name, content_type=content_type)