int[] (int oldParameterCount, int[] newToOldIndex) { int[] oldToNewIndex = new int[oldParameterCount]; Arrays.fill(oldToNewIndex, -1); for (int i = 0; i < newToOldIndex.length; i++) { int oldIndex = newToOldIndex[i]; if (oldIndex >= 0 && oldIndex < oldParameterCount) { oldToNewIndex[oldIndex] = i; } } return oldToNewIndex; }