void () { int weight = 0; for (int i = 0; i < size; i++) { int index1 = subLines1.getInt(i); int index2 = subLines2.getInt(comb[i]); if (lines1.get(index1).equals(lines2.get(index2))) weight++; } if (weight > bestWeight) { bestWeight = weight; System.arraycopy(comb, 0, best, 0, comb.length); } }