Source:
<code>private SSAInstruction[] makeStatements(IClass klass) { assert klass != null; ArrayList<SSAInstruction> statements = new ArrayList<>(); int nextLocal = 2; int retValue = nextLocal++; NewSiteReference ref = NewSiteReference.make(NEW_PC, klass.getReference()); SSANewInstruction N = null; if (klass.isArrayClass()) { int length = nextLocal++; statements.add(insts.ArrayLengthInstruction(statements.size(), length, 1)); int[] sizes = new int[((ArrayClass) klass).getDimensionality()]; Arrays.fill(sizes, length); N = insts.NewInstruction(statements.size(), retValue, ref, sizes); } else { N = insts.NewInstruction(statements.size(), retValue, ref); } statements.add(N); int exceptionValue = nextLocal++; if (klass.getReference().isArrayType()) { int[] params = new int[2]; params[0] = 1; params[1] = retValue; SSAInvokeInstruction S = insts.InvokeInstruction(statements.size(), params, exceptionValue, ARRAYCOPY_SITE, null); statements.add(S); } else { IClass k = klass; while (k != null) { for (IField f : klass.getDeclaredInstanceFields()) { int tempValue = nextLocal++; SSAGetInstruction G = insts.GetInstruction(statements.size(), tempValue, 1, f.getReference()); statements.add(G); SSAPutInstruction P = insts.PutInstruction(statements.size(), retValue, tempValue, f.getReference()); statements.add(P); } k = k.getSuperclass(); } } SSAReturnInstruction R = insts.ReturnInstruction(statements.size(), retValue, false); statements.add(R); SSAInstruction[] result = new SSAInstruction[statements.size()]; Iterator<SSAInstruction> it = statements.iterator(); <START> Arrays.setAll(result, i -> it.next()); <END> return result; }</code><technical_language>This SSAInstruction[] result = statements.toArray(new SSAInstruction[0]);</technical_language>

Target:
private SSAInstruction[] makeStatements(IClass klass) { assert klass != null; ArrayList<SSAInstruction> statements = new ArrayList<>(); int nextLocal = 2; int retValue = nextLocal++; NewSiteReference ref = NewSiteReference.make(NEW_PC, klass.getReference()); SSANewInstruction N = null; if (klass.isArrayClass()) { int length = nextLocal++; statements.add(insts.ArrayLengthInstruction(statements.size(), length, 1)); int[] sizes = new int[((ArrayClass) klass).getDimensionality()]; Arrays.fill(sizes, length); N = insts.NewInstruction(statements.size(), retValue, ref, sizes); } else { N = insts.NewInstruction(statements.size(), retValue, ref); } statements.add(N); int exceptionValue = nextLocal++; if (klass.getReference().isArrayType()) { int[] params = new int[2]; params[0] = 1; params[1] = retValue; SSAInvokeInstruction S = insts.InvokeInstruction(statements.size(), params, exceptionValue, ARRAYCOPY_SITE, null); statements.add(S); } else { IClass k = klass; while (k != null) { for (IField f : klass.getDeclaredInstanceFields()) { int tempValue = nextLocal++; SSAGetInstruction G = insts.GetInstruction(statements.size(), tempValue, 1, f.getReference()); statements.add(G); SSAPutInstruction P = insts.PutInstruction(statements.size(), retValue, tempValue, f.getReference()); statements.add(P); } k = k.getSuperclass(); } } SSAReturnInstruction R = insts.ReturnInstruction(statements.size(), retValue, false); statements.add(R); return statements.toArray(new SSAInstruction[0]); }