code: public int compareTo(Error s) {
      if (getStart() < s.getStart()) {
        return -1;
      } else if (getStart() == s.getStart()) {
        if (getEnd() > s.getEnd()) {
          return -1;
        } else if (getEnd() < s.getEnd()) {
          return 1;
        } else {
          return 0;
        }
      } else {
        return 1;
      }
    }
docs: Compares the specified span to the current span.