void (int start1, int start2, int start3, int end1, int end2, int end3) { int count = end2 - start2; assert end1 - start1 == count; assert end3 - start3 == count; int firstIgnoredCount = -1; for (int i = 0; i < count; i++) { boolean isIgnored = !myTrueEquality.equals(start1 + i, start2 + i, start3 + i); boolean previousAreIgnored = firstIgnoredCount != -1; if (isIgnored && !previousAreIgnored) { firstIgnoredCount = i; } if (!isIgnored && previousAreIgnored) { addChange(start1 + firstIgnoredCount, start2 + firstIgnoredCount, start3 + firstIgnoredCount, start1 + i, start2 + i, start3 + i); firstIgnoredCount = -1; } } if (firstIgnoredCount != -1) { addChange(start1 + firstIgnoredCount, start2 + firstIgnoredCount, start3 + firstIgnoredCount, start1 + count, start2 + count, start3 + count); } }