Copy the values from another element box.
@param src source element box
347857
public void copyValues(ElementBox src)
    {
        super.copyValues(src);
        nested.addAll(src.nested);
        textonly = src.textonly;
        pseudoElements = new HashMap<>(src.pseudoElements);
        style = src.style; 
        pseudoStyle = new HashMap<>(src.pseudoStyle);
        startChild = src.startChild;
        endChild = src.endChild;
        isblock = src.isblock;
        style = src.style;
        display = src.display;
        lineHeight = src.lineHeight;
        whitespace = src.whitespace;
        bgcolor = (src.bgcolor == null) ? null : new Color(src.bgcolor.getRed(), src.bgcolor.getGreen(), src.bgcolor.getBlue(), src.bgcolor.getAlpha());
        bgimages = (src.bgimages == null) ? null : new Vector<BackgroundImage>(src.bgimages);
        transform = src.transform;
        position = src.position;
        topset = src.topset;
        leftset = src.leftset;
        bottomset = src.bottomset;
        rightset = src.rightset;
        
        if (src.coords != null)
            coords = new LengthSet(src.coords);
        
        if (src.margin != null)
            margin = new LengthSet(src.margin);
        if (src.emargin != null)
            emargin = new LengthSet(src.emargin);
        if (src.border != null)
            border = new LengthSet(src.border);
        if (src.padding != null)
            padding = new LengthSet(src.padding);
        if (src.content != null)
            content = new Dimension(src.content);
    }
782522
public void copyFrom(BlockType other) {
        this.isValid = other.isValid;
        this.isTop = other.isTop;
        if (isValid) {
            this.depth = other.depth;
            this.clear();
            this.or(other);
        }
    }
581504
public <T extends AbstractProject<?,?>> T copy(T src, String name) throws IOException {
        return (T)copy((TopLevelItem)src,name);
    }
492403
function (src, dest) {
            // IE has a mergeAttributes method which does exactly that. Let's use it directly.
            // Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for
            // example, a TR can appear as disabled)
            if (Aria.$window.document.body.mergeAttributes) {
                this.copyAttributes = function (src, dest) {
                    dest.mergeAttributes(src, false);
                };
            } else {
                this.copyAttributes = function (src, dest) {
                    // on other browsers, let's copy the attributes manually:
                    var srcAttr = src.attributes;
                    for (var i = 0, l = srcAttr.length; i < l; i++) {
                        var attr = srcAttr[i];
                        dest.setAttribute(attr.name, attr.value);
                    }
                };
            }

            this.copyAttributes(src, dest);
        }
228835
@SuppressWarnings({"unchecked"})
    public synchronized <T extends TopLevelItem> T copy(T src, String name) throws IOException {
        acl.checkPermission(Item.CREATE);
        src.checkPermission(Item.EXTENDED_READ);
        XmlFile srcConfigFile = Items.getConfigFile(src);
        if (!src.hasPermission(Item.CONFIGURE)) {
            Matcher matcher = AbstractItem.SECRET_PATTERN.matcher(srcConfigFile.asString());
            while (matcher.find()) {
                if (Secret.decrypt(matcher.group(1)) != null) {
                    // AccessDeniedException2 does not permit a custom message, and anyway redirecting the user to the login screen is obviously pointless.
                    throw new AccessDeniedException(Messages.ItemGroupMixIn_may_not_copy_as_it_contains_secrets_and_(src.getFullName(), Jenkins.getAuthentication().getName(), Item.PERMISSIONS.title, Item.EXTENDED_READ.name, Item.CONFIGURE.name));
                }
            }
        }
        src.getDescriptor().checkApplicableIn(parent);
        acl.getACL().checkCreatePermission(parent, src.getDescriptor());
        ItemListener.checkBeforeCopy(src, parent);

        T result = (T)createProject(src.getDescriptor(),name,false);

        // copy config
        Files.copy(Util.fileToPath(srcConfigFile.getFile()), Util.fileToPath(Items.getConfigFile(result).getFile()),
                StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING);

        // reload from the new config
        final File rootDir = result.getRootDir();
        result = Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<T,IOException>() {
            @Override public T call() throws IOException {
                return (T) Items.load(parent, rootDir);
            }
        });
        result.onCopiedFrom(src);

        add(result);
        ItemListener.fireOnCopied(src,result);
        Jenkins.getInstance().rebuildDependencyGraphAsync();

        return result;
    }
1328980
public void  copy(GVRPose src)
    {
        int numbones = getNumBones();

        if (getSkeleton() != src.getSkeleton())
            throw new IllegalArgumentException("GVRPose.copy: input pose does not have same skeleton as this pose");
        src.sync();
        for (int i = 0; i < numbones; ++i)
        {
            mBones[i].copy(src.getBone(i));
        }
    }
217409
public static TextContainer copy(TextContainer src, TextContainer dest) {
        return TextParams.copy(src, dest);
    }
1178250
public static void matrixCopy(Object[][] src, Object[][] dest) {
        if (src != null && dest != null) {
            for (int i = 0; i < src.length; i++) {
                System.arraycopy(src[i], 0, dest[i], 0, src[i].length);
            }
        }
    }
1325648
public <T, E extends T> void copyPropertiesOfInheritedClass(final T src, final E dest) {
        if (src == null) {
            throw new IllegalArgumentException("src can't be null");
        }
        if (dest == null) {
            throw new IllegalArgumentException("dest can't be null");
        }
        final Class<? extends Object> srcClz = src.getClass();
        final Class<? extends Object> destClz = dest.getClass();
        if (srcClz.isArray()) {
            if (!destClz.isArray()) {
                throw new IllegalArgumentException("can't copy from array to non-array class " + destClz);
            }
            final int length = Array.getLength(src);
            for (int i = 0; i < length; i++) {
                final Object v = Array.get(src, i);
                Array.set(dest, i, v);
            }
            return;
        }
        final List<Field> fields = allFields(srcClz);
        for (final Field field : fields) {
            if (!Modifier.isStatic(field.getModifiers())) {
                try {
                    final Object fieldObject = field.get(src);
                    field.set(dest, fieldObject);
                } catch (final IllegalArgumentException e) {
                    throw new RuntimeException(e);
                } catch (final IllegalAccessException e) {
                    throw new RuntimeException(e);
                }
            }
        }
    }
483939
public void write(final byte[] src, int off, int len)
	{
		if(src == null) throw new NullPointerException();
		if((off < 0) || (off > src.length) || (len < 0) || ((off + len) > src.length) || ((off + len) < 0)) throw new IndexOutOfBoundsException();

		writeLoop(src, off, len);		
	}
378863
public static void copyRecursive(Resource src, Resource trg, ResourceFilter filter) throws IOException {
	// print.out(src);
	// print.out(trg);
	if (!src.exists()) return;
	if (src.isDirectory()) {
	    if (!trg.exists()) trg.createDirectory(true);
	    Resource[] files = filter == null ? src.listResources() : src.listResources(filter);
	    if (files != null) for (int i = 0; i < files.length; i++) {
		copyRecursive(files[i], trg.getRealResource(files[i].getName()), filter);
	    }
	}
	else if (src.isFile()) {
	    touch(trg);
	    IOUtil.copy(src, trg);
	}
    }
513987
public static void fileCopy(final File src, final File dest, final boolean overwrite) throws IOException {
        if (!dest.exists() || (dest.exists() && overwrite)) {
            // Create parent directory structure if necessary
            FileUtils.mkParentDirs(dest);

            if (overwrite) {
                Files.copy(src.toPath(), dest.toPath(), StandardCopyOption.REPLACE_EXISTING);
            } else {
                Files.copy(src.toPath(), dest.toPath());
            }
        }
    }
1373510
public void copyFrom(Frame<ValueType> other) {
        lastUpdateTimestamp = other.lastUpdateTimestamp;
        slotList = new ArrayList<>(other.slotList);
        isTop = other.isTop;
        isBottom = other.isBottom;
    }
1087093
void copyValue(MutableBigInteger src) {
        int len = src.intLen;
        if (value.length < len)
            value = new int[len];
        System.arraycopy(src.value, src.offset, value, 0, len);
        intLen = len;
        offset = 0;
    }
67153
private <X> void copy(X[] elementsCopy) {
		if (!isEmpty()) {
			if (firstIndex < lastIndex) {
				System.arraycopy(elements, firstIndex, elementsCopy, 0, lastIndex - firstIndex);
			} else {
				int firstSize = elements.length - firstIndex;
				System.arraycopy(elements, firstIndex, elementsCopy, 0, firstSize);
				System.arraycopy(elements, 0, elementsCopy, firstSize, lastIndex);
			}
		}
	}
1109942
public static void copy(RequestContext src, RequestContext dst) {
        dst.attr(TRACE_CONTEXT_KEY).set(src.attr(TRACE_CONTEXT_KEY).get());
    }
1012472
public void write(final byte[] src)
	{
		if(src == null) throw new NullPointerException();

		if(src.length < buffer.length - pos) {
			System.arraycopy(src, 0, buffer, pos, src.length);
			pos += src.length;
			size += src.length;
			return;
		}
		writeLoop(src, 0, src.length);
	}