double[] a1 = {0.5, 1.25, -7., 0., 3.75, 101, 0.25, 33.75};
double[] ret = Arrays.copyOf(a1, a1.length);
assertNotSame(a1, ret);
assertTrue(Arrays.equals(a1, ret));
ret = Arrays.copyOf(a1, 2);
<BUG>assertTrue(Arrays.equals(new double[] {0.5, 1.25}, ret));
ret = Arrays.copyOf(a1, a1.length * 2);</BUG>
assertEquals(a1.length * 2, ret.length);
int i = 0;
for (; i < a1.length; i++) {

double[] a1 = {0.5, 1.25, -7., 0., 3.75, 101, 0.25, 33.75};
double[] ret = Arrays.copyOf(a1, a1.length);
assertNotSame(a1, ret);
assertTrue(Arrays.equals(a1, ret));
ret = Arrays.copyOf(a1, 2);
assertTrue(Arrays.equals(new double[] {0.5, 1.25}, ret));
ret = Arrays.copyOf(a1, 0);
assertEquals(0, ret.length);
ret = Arrays.copyOf(a1, a1.length * 2);
assertEquals(a1.length * 2, ret.length);
int i = 0;
for (; i < a1.length; i++) {
