void (int[] ints1, int[] ints2, String message) { final BitSet[] reindexChanges = new BitSet[]{new BitSet(), new BitSet()}; LCSBuilder builder = new LCSBuilder() { private int myIndex1 = 0; private int myIndex2 = 0; @Override public void addEqual(int length) { myIndex1 += length; myIndex2 += length; } @Override public void addChange(int first, int second) { reindexChanges[0].set(myIndex1, myIndex1 + first); reindexChanges[1].set(myIndex2, myIndex2 + second); myIndex1 += first; myIndex2 += second; } }; Reindexer reindexer = new Reindexer(); int[][] discarded = reindexer.discardUnique(ints1, ints2); MyersLCS lcs = new MyersLCS(discarded[0], discarded[1]); lcs.execute(); reindexer.reindex(lcs.getChanges(), builder); IntLCSAutoTest.verifyLCS(ints1, ints2, reindexChanges[0], reindexChanges[1]); }