Copies all mappings from the src builder, with modifications.
This builder here must not be built yet, and should be empty.
766097
void copyFrom(CollationDataBuilder src, CEModifier modifier) {
        if(!isMutable()) {
            throw new IllegalStateException("attempt to copyFrom() after build()");
        }
        CopyHelper helper = new CopyHelper(src, this, modifier);
        Iterator<Trie2.Range> trieIterator = src.trie.iterator();
        Trie2.Range range;
        while(trieIterator.hasNext() && !(range = trieIterator.next()).leadSurrogate) {
            enumRangeForCopy(range.startCodePoint, range.endCodePoint, range.value, helper);
        }
        // Update the contextChars and the unsafeBackwardSet while copying,
        // in case a character had conditional mappings in the source builder
        // and they were removed later.
        modified |= src.modified;
    }
918484
public MapField<K, V> copy() {
        return new MapField<K, V>(converter, StorageMode.MAP, MapFieldLite.copy(getMap()), null);
    }
655724
private void cloneAndSortMappings(IReaction reaction, IReaction copyOfReaction,
            Map<IAtomContainer, int[]> permutationMap) {

        // make a lookup for the indices of the atoms in the copy
        final Map<IChemObject, Integer> indexMap = new HashMap<IChemObject, Integer>();
        List<IAtomContainer> all = ReactionManipulator.getAllAtomContainers(copyOfReaction);
        int globalIndex = 0;
        for (IAtomContainer ac : all) {
            for (IAtom atom : ac.atoms()) {
                indexMap.put(atom, globalIndex);
                globalIndex++;
            }
        }

        Map<IAtom, IAtom> atomAtomMap = atomAtomMap(reaction, copyOfReaction, permutationMap);
        List<IMapping> map = cloneMappings(reaction, atomAtomMap);

        Comparator<IMapping> mappingSorter = new Comparator<IMapping>() {

            /**
             * {@inheritDoc}
             */
            @Override
            public int compare(IMapping o1, IMapping o2) {
                IChemObject o10 = o1.getChemObject(0);
                IChemObject o20 = o2.getChemObject(0);
                return indexMap.get(o10).compareTo(indexMap.get(o20));
            }

        };
        Collections.sort(map, mappingSorter);
        int mappingIndex = 0;
        for (IMapping mapping : map) {
            mapping.getChemObject(0).setProperty(CDKConstants.ATOM_ATOM_MAPPING, mappingIndex);
            mapping.getChemObject(1).setProperty(CDKConstants.ATOM_ATOM_MAPPING, mappingIndex);
            copyOfReaction.addMapping(mapping);
            mappingIndex++;
        }

    }
537146
public static Builder copyOf(final Link prototype) {
        return new Builder(prototype.rel, prototype.href)
                .withType(prototype.type)
                .withProfile(prototype.profile)
                .withTitle(prototype.title)
                .withName(prototype.name)
                .withDeprecation(prototype.deprecation)
                .withHrefLang(prototype.hreflang);
    }
267958
def copy_fields(src, to):
    
    args = tuple(getattr(src, field.attname) for field in src._meta.fields)
    return to(*args)
25568
public void copyProviderToCreator(Resource.Provider provider,
                                      Resource.Creator creator) {
        provider.stream().forEach((ConsumerWithThrowable<Resource.Readable, IOException>) resource ->
                copyResourceWithStreams(resource, creator.create(resource.getPath())));
    }
52839
def _copy_params(self):
        
        cls = type(self)
        src_name_attrs = [(x, getattr(cls, x)) for x in dir(cls)]
        src_params = list(filter(lambda nameAttr: isinstance(nameAttr[1], Param), src_name_attrs))
        for name, param in src_params:
            setattr(self, name, param._copy_new_parent(self))
141925
def process_mappings(self):
        
        for mapping_a in self.mappings:
            for mapping_b in self.mappings:
                if mapping_a['source'] == mapping_b['dest']:
                    self.mappings.remove(mapping_b)
                    break

        self.node['properties']['mappings'] = {}
        mappings = self.node['properties']['mappings']
        for mapping in self.mappings:
            mappings[mapping['source']] = mapping['dest']
822517
function copyAndOffsetMapping(existingMapping) {
    var column     = getColumnAfter(existingMapping.generatedLine - 1, existingMapping.generatedColumn);
    var newMapping = {
      generated: {
        line  : existingMapping.generatedLine,
        column: column
      }
    };
    if (existingMapping.source) {
      newMapping.source   = existingMapping.source;
      newMapping.original = {
        line  : existingMapping.originalLine,
        column: existingMapping.originalColumn
      };
      if (existingMapping.name) {
        newMapping.name = existingMapping.name;
      }
    }
    generator.addMapping(newMapping);
  }
1034715
protected synchronized void serializeCacheMapping() {
		for (Map.Entry<String, List<FilePathMapping>> entry : linkedResourceMap.entrySet()) {

			StringBuilder strb = new StringBuilder();
			Iterator<FilePathMapping> iter = entry.getValue().iterator();
			if (iter.hasNext()) {

				for (; iter.hasNext();) {
					FilePathMapping fMapping = iter.next();
					strb.append(fMapping.getPath()).append(MAPPING_TIMESTAMP_SEPARATOR)
							.append(fMapping.getLastModified());
					if (iter.hasNext()) {
						strb.append(SEMICOLON);
					}
				}
				cacheProperties.put(JAWR_MAPPING_PREFIX + entry.getKey(), strb.toString());
			}
		}

		File f = new File(getCacheFilePath());
		if (!f.getParentFile().exists()) {
			f.getParentFile().mkdirs();
		}
		FileWriter fw = null;
		try {
			fw = new FileWriter(f);
			cacheProperties.store(fw, "Cache properties of " + getName() + " generator");
		} catch (IOException e) {
			throw new BundlingProcessException("Unable to save cache file mapping ", e);
		} finally {
			IOUtils.close(fw);
		}
	}
420727
static MemberMap cloneAdding(MemberMap source, MemberImpl... newMembers) {
        Map<Address, MemberImpl> addressMap = new LinkedHashMap<>(source.addressToMemberMap);
        Map<String, MemberImpl> uuidMap = new LinkedHashMap<>(source.uuidToMemberMap);

        for (MemberImpl member : newMembers) {
            putMember(addressMap, uuidMap, member);
        }

        return new MemberMap(source.version + newMembers.length, addressMap, uuidMap);
    }
1231968
public final static void copyProperties(Object from, Object to) {

        Set<Field> fromSet = getAllFiled(from.getClass());
        Set<Field> toSet = getAllFiled(to.getClass());

        Map<String, Field> toMap = new HashMap<String, Field>();
        for (Field f : toSet) {
            toMap.put(f.getName(), f);
        }

        for (Field f : fromSet) {
            if (Modifier.isStatic(f.getModifiers())) {
                continue;
            }
            String name = f.getName();
            Field toField = toMap.get(name);
            if (toField == null) {
                continue;
            }

            toField.setAccessible(true);
            f.setAccessible(true);
            try {
                toField.set(to, f.get(from));
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }

    }
1164125
function copyOwnProperties(dst, src) {
  for (var prop in src) {
    if (src.hasOwnProperty(prop)) {
      dst[prop] = src[prop];
    }
  }
}
867036
public void copyAdditionalPropertiesFrom(BaseResourceMessage theMsg) {
		if (theMsg.myAttributes != null) {
			if (myAttributes == null) {
				myAttributes = new HashMap<>();
			}
			myAttributes.putAll(theMsg.myAttributes);
		}
	}
482813
def copy(self, deep=True):
        
        return self.__constructor__(query_compiler=self._query_compiler.copy())
887166
public void copyFrom(Invocation invocation)
  {
    _classLoader = invocation._classLoader;
    
    _rawHost = invocation._rawHost;
    _rawURI = invocation._rawURI;

    _hostName = invocation._hostName;
    _port = invocation._port;
    _uri = invocation._uri;
    
    _depend = invocation._depend;
    
    _queryString = invocation._queryString;
  }
225721
private void copyResources( List fileSets )
        throws MojoExecutionException
    {
        final String[] emptyStrArray = {};
        
        for ( Iterator it = fileSets.iterator(); it.hasNext(); )
        {
            FileSet fileSet = (FileSet) it.next();

            File resourceDirectory = new File( fileSet.getDirectory() );
            if ( !resourceDirectory.isAbsolute() )
            {
                resourceDirectory = new File( project.getBasedir(), resourceDirectory.getPath() );
            }

            if ( !resourceDirectory.exists() )
            {
                getLog().info( "Additional resource directory does not exist: " + resourceDirectory );
                continue;
            }

            DirectoryScanner scanner = new DirectoryScanner();

            scanner.setBasedir( resourceDirectory );
            if ( fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty() )
            {
                scanner.setIncludes( (String[]) fileSet.getIncludes().toArray( emptyStrArray ) );
            }
            else
            {
                scanner.setIncludes( DEFAULT_INCLUDES );
            }

            if ( fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty() )
            {
                scanner.setExcludes( (String[]) fileSet.getExcludes().toArray( emptyStrArray ) );
            }

            if (fileSet.isUseDefaultExcludes())
            {
                scanner.addDefaultExcludes();
            }

            scanner.scan();

            List includedFiles = Arrays.asList( scanner.getIncludedFiles() );

            getLog().info( "Copying " + includedFiles.size() + " additional resource"
                           + ( includedFiles.size() > 1 ? "s" : "" ) );

            for ( Iterator j = includedFiles.iterator(); j.hasNext(); )
            {
                String destination = (String) j.next();
                File source = new File( resourceDirectory, destination );
                File destinationFile = new File( buildDirectory, destination );

                if ( !destinationFile.getParentFile().exists() )
                {
                    destinationFile.getParentFile().mkdirs();
                }

                try
                {
                    FileUtils.copyFile(source, destinationFile);
                }
                catch ( IOException e )
                {
                    throw new MojoExecutionException( "Error copying additional resource " + source, e );
                }
            }
        }
    }