int sourceLength = Array.getLength(source);
Class arrayClass = source.getClass();
Class componentClass = arrayClass.getComponentType();
Object result = Array.newInstance(componentClass, sourceLength * 2);
System.arraycopy(source, 0, result, 0, sourceLength);
return result;