Returns a deep copy of a pdef set.
501174
public static <T> Set<T> copy(final Set<T> set) {
		if (set == null) {
			return null;
		}

		TypeEnum elementType = null;
		Set<T> copy = new HashSet<T>();
		for (T element : set) {
			T elementCopy = null;
			if (element != null) {
				if (elementType == null) {
					elementType = TypeEnum.dataTypeOf(element.getClass());
				}
				elementCopy = copy(element, elementType);
			}

			copy.add(elementCopy);
		}

		return copy;
	}
420840
def copy(self, *args, **kwargs):
        """"""

        for slot in self.__slots__:
            attr = getattr(self, slot)
            if slot[0] == '_':  # convert protected attribute name to public
                slot = slot[1:]
            if slot not in kwargs:
                kwargs[slot] = attr

        result = type(self)(*args, **kwargs)

        return result
499800
def _mappingGetValueSet(mapping, keys):
    
    setUnion = set()
    for k in keys:
        setUnion = setUnion.union(mapping[k])
    return setUnion
821374
def copy(self):
        
        o = SimLibrary()
        o.procedures = dict(self.procedures)
        o.non_returning = set(self.non_returning)
        o.prototypes = dict(self.prototypes)
        o.default_ccs = dict(self.default_ccs)
        o.names = list(self.names)
        return o
1059398
def deepish_copy(org):
    
    out = dict().fromkeys(org)
    for k, v in org.items():
        if isinstance(v, dict):
            out[k] = deepish_copy(v)
        else:
            try:
                out[k] = v.copy()   # dicts, sets
            except AttributeError:
                try:
                    out[k] = v[:]   # lists, tuples, strings, unicode
                except TypeError:
                    out[k] = v      # ints
    return out
126893
private String[] getCopyFrom(int from, String[] propertyKeyArray) {
		return Arrays.copyOfRange(propertyKeyArray, from,
				propertyKeyArray.length);
	}
13791
private UnconditionalValueDerefSet duplicateFact(UnconditionalValueDerefSet fact) {
        UnconditionalValueDerefSet copyOfFact = createFact();
        copy(fact, copyOfFact);
        fact = copyOfFact;
        return fact;
    }
80969
def copy(self):
        
        return self.__class__(self, key=self._keyfn, precedes=self._precedes)
1342439
def copy(self, deep=False):
        """"""
        if not deep:
            return self.__class__(self[:], attrs=self.attrs.copy(),
                                  auto_update=not bool(self.no_auto_update))
        else:
            return self.__class__(
                [arr.psy.copy(deep) for arr in self], attrs=self.attrs.copy(),
                auto_update=not bool(self.auto_update))
1337805
def copy(self):
        """"""
        other = MeanStdFilter(self.shape)
        other.sync(self)
        return other
121777
def copy(self):
        

        ld = LiveDefinitions()
        ld._memory_map = self._memory_map.copy()
        ld._register_map = self._register_map.copy()
        ld._defs = self._defs.copy()

        return ld
1220274
def copy(self, key):
        
        copy = Set(key=key, db=self.db)
        copy.clear()
        copy |= self
        return copy
352499
def get_pdb_sets(self):
        ''''''

        assert(self.id != None)

        data = []
        for pdb_set in self.pdb_sets:

            pdb_set_record = dict(
                PPComplexID = self.id,
                SetNumber = pdb_set['set_number'],
                IsComplex = pdb_set['is_complex'],
                Notes = pdb_set['notes'],
            )

            chain_records = []
            for side, chain_details in sorted(pdb_set['chains'].iteritems()):
                chain_records.append(dict(
                    PPComplexID = self.id,
                    SetNumber = pdb_set['set_number'],
                    Side = side,
                    ChainIndex = chain_details['chain_index'],
                    PDBFileID = chain_details['pdb_file_id'],
                    Chain = chain_details['chain_id'],
                    NMRModel = chain_details['nmr_model'],
                ))

            data.append(dict(pdb_set = pdb_set_record, chain_records = chain_records))

        return data
1102525
public Set<Reference> getNonCopytoResult() {
        final Set<Reference> nonCopytoSet = new LinkedHashSet<>(128);

        nonCopytoSet.addAll(nonConrefCopytoTargets);
        for (final URI f : conrefTargets) {
            nonCopytoSet.add(new Reference(stripFragment(f), currentFileFormat()));
        }
        for (final URI f : copytoMap.values()) {
            nonCopytoSet.add(new Reference(stripFragment(f)));
        }
        for (final URI f : ignoredCopytoSourceSet) {
            nonCopytoSet.add(new Reference(stripFragment(f)));
        }
        for (final URI filename : coderefTargetSet) {
            nonCopytoSet.add(new Reference(stripFragment(filename)));
        }
        return nonCopytoSet;
    }
1274781
public PDatabase getPDatabase(String strDBName, char charPDatabaseType, boolean bCreateIfNew)
    {
        PDatabase pDB = (PDatabase)m_htDBList.get(charPDatabaseType + ":" + strDBName);
        if (pDB == null)
            if (bCreateIfNew)
        {
            String strClassName = (String)this.getProperty(DBCLASS);
            if (strClassName != null)
            {
                try
                {
                    Class<?> c = Class.forName(strClassName);
                    if (c != null)
                    {
                        pDB = (PDatabase)c.newInstance();
                        if (pDB != null)
                        {
                            pDB.init(this, strDBName, charPDatabaseType);
                            String strPrefix = (String)this.getProperty(PREFIX);
                            String strSuffix = (String)this.getProperty(SUFFIX);
                            if ((strPrefix != null) || (strSuffix != null))
                                pDB.setFilePath(strPrefix, strSuffix);
                        }
                    }
                }
                catch (Exception e) {
                    e.printStackTrace();
                    pDB = null;
                }
            }
        }
        return pDB;
    }
506840
def copy(self):
		""""""
		ret = IndexedDict()
		ret._dict = self._dict.copy()
		ret._list = list(self._list)
		return ret
504452
def copy(self):
        """"""
        cpy = self.__class__()
        cpy._autostep = self._autostep
        cpy.padding = self.padding
        cpy.update(self)
        return cpy