code: public static Object repeat(Object arr, int times) {
          Class<?> toType = Types.arrayElementType(arr.getClass());
          if ( times < 1 )
              return Array.newInstance(toType, 0);
          int[] dims = dimensions(arr);
          int length = dims[0];
          dims[0] *= times;
          int i = 0, total = dims[0];
          Object toArray = Array.newInstance(toType, dims);
          while ( i < total ) {
              System.arraycopy(arr, 0, toArray, i, length);
              i += length;
          }
          return toArray;
      }
docs: Repeat the contents of an array a number of times.
  @param arr the array object to repeat
  @param times number of repetitions
  @return a new array instance with repeated contents