Isn't this class doing more then a comparator? This class tells us about sizes and hashes - things which have nothing to do with comparision. I don't expect them in a comparator.

I agree that we need a Comparator concept (also because of the auto-CRLF stuff). But shouldn't we leave aspects which belong to one Diff-able object in a seperate class/interface? Something which was previously called Sequence.

Something like

abstract class DiffComparator<S extends Sequence> {
  public abstract boolean equals(S a, int ai, S b, int bi);
}

abstract class Sequence {
  public abstract int size();
  public abstract int hash(int ptr);
}