private static RegisterSpec[] dupArray(RegisterSpec[] orig) {
    RegisterSpec[] copy = new RegisterSpec[orig.length];

    System.arraycopy(orig, 0, copy, 0, orig.length);

    return copy;
  }
Duplicates a RegisterSpec array.

@param orig {@code non-null;} array to duplicate
@return {@code non-null;} new instance
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/SsaRenamer.java