Copy bands elements from source to dest band, also makes sure copied elements
are placed below existing ones (Y offset is calculated)
@param destBand
@param sourceBand
180616
public static void copyBandElements(JRDesignBand destBand, JRBand sourceBand) {
		int offset = findVerticalOffset(destBand);
		
		if (destBand == null)
			throw new DJException("destination band cannot be null");
		
		if (sourceBand == null)
			return;

		for (JRChild jrChild : sourceBand.getChildren()) {
			JRDesignElement element = (JRDesignElement) jrChild;
			JRDesignElement dest = null;
			try {
				if (element instanceof JRDesignGraphicElement) {
					Constructor<? extends JRDesignElement> constructor = element.getClass().getConstructor(JRDefaultStyleProvider.class);
					JRDesignStyle style = new JRDesignStyle();
					dest = constructor.newInstance(style.getDefaultStyleProvider());
				} else {
					dest = element.getClass().newInstance();
				}

				BeanUtils.copyProperties(dest, element);
				dest.setY(dest.getY() + offset);
			} catch (Exception e) {
				log.error("Exception copying elements from band to band: " + e.getMessage(), e);
			}
			destBand.addElement(dest);
		}
	}
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);
        }
    }
480236
function copyElements(src, dst, dstNdx, offset) {
  offset = offset || 0;
  const length = src.length;
  for (let ii = 0; ii < length; ++ii) {
    dst[dstNdx + ii] = src[ii] + offset;
  }
}
430210
protected void copyFrom(CompilerHints source) {
		this.outputSize = source.outputSize;
		this.outputCardinality = source.outputCardinality;
		this.avgOutputRecordSize = source.avgOutputRecordSize;
		this.filterFactor = source.filterFactor;
		
		if (source.uniqueFields != null && source.uniqueFields.size() > 0) {
			if (this.uniqueFields == null) {
				this.uniqueFields = new HashSet<FieldSet>();
			} else {
				this.uniqueFields.clear();
			}
			
			this.uniqueFields.addAll(source.uniqueFields);
		}
	}
41537
public void setBandwidthSegment(com.google.api.ads.admanager.axis.v201902.BandwidthGroupTargeting bandwidthSegment) {
        this.bandwidthSegment = bandwidthSegment;
    }
357755
public static void copyProperties(Object source, Object target, String... ignoreProperties) {
		copyProperties(source, target, CopyOptions.create().setIgnoreProperties(ignoreProperties));
	}
43062
@Override
	public void setSecondAxis(double x, double y, double z) {
		setSecondAxis(x, y, z, getSecondAxisExtent());
	}
511235
public static void insertBand( GrayS64 input, int band , InterleavedS64 output) {

		final int numBands = output.numBands;
		for (int y = 0; y < input.height; y++) {
			int indexIn = input.getStartIndex() + y * input.getStride();
			int indexOut = output.getStartIndex() + y * output.getStride() + band;
			int end = indexOut + output.width*numBands - band;
			for (; indexOut < end; indexOut += numBands , indexIn++ ) {
				output.data[indexOut] = input.data[indexIn];
			}
		}
	}
900298
void copyTo(byte[] dest, int destOffset) {
        System.arraycopy(array,offset,dest,destOffset,length());
    }
1225454
@Override
    public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        SourceTargetUtility cache;
        synchronized (SOURCE_CACHE) {
            //String id = getID();
            cache = SOURCE_CACHE.get(norm2);
            if (cache == null) {
                cache = new SourceTargetUtility(new NormalizingTransform(norm2), norm2);
                SOURCE_CACHE.put(norm2, cache);
            }
        }
        cache.addSourceTargetSet(this, inputFilter, sourceSet, targetSet);
    }
1281079
public static void copyDirToDir(File source, File dest, FilenameFilter filter) throws IOException {
        if (!source.isDirectory() || !dest.isDirectory()) {
            return;
        }

        List<File> files = listFiles(source, filter, true);
        String sourcePath = source.getAbsolutePath();
        String destPath = dest.getAbsolutePath();
        for (File file : files) {
            String filePath = file.getAbsolutePath();
            if (sourcePath.equals(filePath)) {
                continue;
            }
            String newPath = destPath + File.separator + filePath.substring(sourcePath.length());
            File destFile = new File(newPath);
            if (file.isDirectory()) {
                destFile.mkdirs();
            } else {
                copy(file, destFile);
            }
        }
    }
640874
@Override
    public void write(File dest) {
        if (origin instanceof FileOrigin) {
            File target = getOutputFile(dest);

            FileOrigin fo = (FileOrigin) origin;
            if (target.exists() && target.length() == fo.getLength()
                    && target.lastModified() >= fo.getLastModified()) {
                //log.debug("Target file is newer than source file, skip copying.");
                return;
            }
            try {
                File parentFile = target.getParentFile();
                if (!parentFile.exists()) {
                    parentFile.mkdirs();
                }

                log.debug("Copying static file to " + target);
                FileUtils.copyFile(fo.getFile(), target);
            } catch (IOException e) {
                log.error("Copying static file error: " + target, e);
                throw new RuntimeException(e);
            }
        } else {
            log.warn("Origin not support yet: " + origin);
        }
    }
1058546
public T getBand(int band) {
		if (band >= bands.length || band < 0)
			throw new IllegalArgumentException("The specified band is out of bounds: "+band);

		return bands[band];
	}
895894
private void copy(Expression expression) {
		this.operator = expression.operator;
		this.elementsArray = expression.elementsArray;
		this.elements = expression.elements;
	}
356545
public final void setSource(Node source) {
    if (prototypeSlot != null) {
      // NOTE(bashir): On one hand when source is null we want to drop any
      // references to old nodes retained in prototypeSlot. On the other hand
      // we cannot simply drop prototypeSlot, so we retain all information
      // except the propertyNode for which we use an approximation! These
      // details mostly matter in hot-swap passes.
      if (source == null || prototypeSlot.getNode() == null) {
        prototypeSlot =
            new Property(
                prototypeSlot.getName(),
                prototypeSlot.getType(),
                prototypeSlot.isTypeInferred(),
                source);
      }
    }
    this.source = source;
  }
449069
public static void copyProperties(Object source, Object target) {
		copyProperties(source, target, CopyOptions.create());
	}
1206627
public static <T extends Comparable<? super T>> void descDeep(final T[] comparableArray) {

        if (ArrayUtils.isEmpty(comparableArray)) {
            return;
        }
        descByReflex(comparableArray);
    }