public boolean equals(Object o) {
    if (o == this) return true;
    if (!(o instanceof PsiFragment other)) return false;

    return other.getStartOffset() == getStartOffset() &&
           other.getEndOffset() == getEndOffset() &&
           Comparing.equal(other.getFile(), getFile());
  }
public boolean equals(Object o)