Create a duplicate of this emitter.
The duplicate should be added to a ParticleSystem to be used.
@return a copy if no IOException occurred, null otherwise
18875
public ConfigurableEmitter duplicate() {
		ConfigurableEmitter theCopy = null;
		try {
			ByteArrayOutputStream bout = new ByteArrayOutputStream();
			ParticleIO.saveEmitter(bout, this);
			ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
			theCopy = ParticleIO.loadEmitter(bin);
		} catch (IOException e) {
			Log.error("Slick: ConfigurableEmitter.duplicate(): caught exception " + e.toString());
			return null;
		}
		return theCopy;
	}
99473
@Override
	public AbstractMessage copy()
    {
        BytesMessageImpl clone = new BytesMessageImpl();
        copyCommonFields(clone);
        tidyUp();
        clone.body = this.body;
        
        return clone;
    }
231501
public final Object copy(final Object toCopy, PersistenceBroker broker)
	{
		return clone(toCopy, IdentityMapFactory.getIdentityMap(), new HashMap());
	}
373643
public ExceptionSet duplicate() {
        ExceptionSet dup = factory.createExceptionSet();
        dup.exceptionSet.clear();
        dup.exceptionSet.or(this.exceptionSet);
        dup.explicitSet.clear();
        dup.explicitSet.or(this.explicitSet);
        dup.size = this.size;
        dup.universalHandler = this.universalHandler;
        dup.commonSupertype = this.commonSupertype;

        return dup;
    }
816780
def duplicate(self, contributor=None, inherit_collections=False):
        """"""
        duplicate = Entity.objects.get(id=self.id)
        duplicate.pk = None
        duplicate.slug = None
        duplicate.name = 'Copy of {}'.format(self.name)
        duplicate.duplicated = now()
        if contributor:
            duplicate.contributor = contributor

        duplicate.save(force_insert=True)

        assign_contributor_permissions(duplicate)

        # Override fields that are automatically set on create.
        duplicate.created = self.created
        duplicate.save()

        # Duplicate entity's data objects.
        data = get_objects_for_user(contributor, 'view_data', self.data.all())  # pylint: disable=no-member
        duplicated_data = data.duplicate(contributor)
        duplicate.data.add(*duplicated_data)

        if inherit_collections:
            collections = get_objects_for_user(
                contributor,
                'add_collection',
                self.collections.all()  # pylint: disable=no-member
            )
            for collection in collections:
                collection.entity_set.add(duplicate)
                copy_permissions(collection, duplicate)
                collection.data.add(*duplicated_data)
                for datum in duplicated_data:
                    copy_permissions(collection, datum)

        return duplicate
516
public static <T> BeanCopier<T> create(Object source, T dest, CopyOptions copyOptions) {
		return create(source, dest, dest.getClass(), copyOptions);
	}
836687
public T copy() {
        T ret = createLike();
        ret.getMatrix().set(this.getMatrix());
        return ret;
    }
262072
public Presence cloneWithNewId() {
        Presence clone = clone();
        clone.setStanzaId(StanzaIdUtil.newStanzaId());
        return clone;
    }
950611
@Override
	public AbstractMessage copy()
    {
        TextMessageImpl clone = new TextMessageImpl();
        copyCommonFields(clone);
        clone.body = this.body;
        
        return clone;
    }
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
911832
def duplicate(self, contributor=None):
        """"""
        if self.status not in [self.STATUS_DONE, self.STATUS_ERROR]:
            raise ValidationError('Data object must have done or error status to be duplicated')

        duplicate = Data.objects.get(id=self.id)
        duplicate.pk = None
        duplicate.slug = None
        duplicate.name = 'Copy of {}'.format(self.name)
        duplicate.duplicated = now()
        if contributor:
            duplicate.contributor = contributor

        duplicate._perform_save(force_insert=True)  # pylint: disable=protected-access

        assign_contributor_permissions(duplicate)

        # Override fields that are automatically set on create.
        duplicate.created = self.created
        duplicate._perform_save()  # pylint: disable=protected-access

        if self.location:
            self.location.data.add(duplicate)  # pylint: disable=no-member

        duplicate.storages.set(self.storages.all())  # pylint: disable=no-member

        for migration in self.migration_history.order_by('created'):  # pylint: disable=no-member
            migration.pk = None
            migration.data = duplicate
            migration.save(force_insert=True)

        # Inherit existing child dependencies.
        DataDependency.objects.bulk_create([
            DataDependency(child=duplicate, parent=dependency.parent, kind=dependency.kind)
            for dependency in DataDependency.objects.filter(child=self)
        ])
        # Inherit existing parent dependencies.
        DataDependency.objects.bulk_create([
            DataDependency(child=dependency.child, parent=duplicate, kind=dependency.kind)
            for dependency in DataDependency.objects.filter(parent=self)
        ])

        return duplicate
343679
public C4Replicator createReplicator(
        C4Socket openSocket,
        int push, int pull,
        byte[] options,
        C4ReplicatorListener listener,
        Object replicatorContext)
        throws LiteCoreException {
        return new C4Replicator(handle, openSocket.handle, push, pull,
            options, listener, replicatorContext);
    }
948285
public static JusFragment newInstance() {
		JusFragment fragment = new JusFragment();
		Bundle args = new Bundle();
		fragment.setArguments(args);
		return fragment;
	}
122302
def duplicate(self):
        '''
        
        '''
        return self.__class__(self.method, self.status, self.date, self.ref)
170353
public static TaskEntity create() {
    TaskEntity task = new TaskEntity();
    task.isIdentityLinksInitialized = true;
    task.setCreateTime(ClockUtil.getCurrentTime());
    return task;
  }
231615
@Override
    public Collection duplicate(boolean deepCopy) {
	new ArrayImpl().duplicate(deepCopy);
	return new ListAsArray((List) Duplicator.duplicate(list, deepCopy));
    }
168733
public static TypeAdapterFactory create() {

    if (geometryTypeFactory == null) {
      geometryTypeFactory = RuntimeTypeAdapterFactory.of(Geometry.class, "type", true)
        .registerSubtype(GeometryCollection.class, "GeometryCollection")
        .registerSubtype(Point.class, "Point")
        .registerSubtype(MultiPoint.class, "MultiPoint")
        .registerSubtype(LineString.class, "LineString")
        .registerSubtype(MultiLineString.class, "MultiLineString")
        .registerSubtype(Polygon.class, "Polygon")
         .registerSubtype(MultiPolygon.class, "MultiPolygon");
    }
    return geometryTypeFactory;
  }