FairDiffIterable (@NotNull final CodePointsOffsets chars1, @NotNull final CodePointsOffsets chars2, @NotNull final CharSequence text1, @NotNull final CharSequence text2, @NotNull final FairDiffIterable changes, @NotNull final CancellationChecker indicator) { ChangeBuilder builder = new ChangeBuilder(text1.length(), text2.length()); for (Range range : changes.iterateUnchanged()) { int count = range.end1 - range.start1; for (int i = 0; i < count; i++) { // Punctuation code points are always 1 char int offset1 = chars1.offsets[range.start1 + i]; int offset2 = chars2.offsets[range.start2 + i]; builder.markEqual(offset1, offset2); } } return fair(builder.finish()); }