docs: private boolean goToNextStartPosition() throws IOException {
      int basicStartPosition;
      int basicEndPosition;
      if (docId == -1 || docId == NO_MORE_DOCS) {
        throw new IOException("no document");
      } else {
        while ((basicStartPosition = subSpans
            .nextStartPosition()) != NO_MORE_POSITIONS) {
          basicEndPosition = subSpans.endPosition();
          startPosition = Math.max(minPosition,
              (basicStartPosition - query.maximumLeft));
          endPosition = Math.min(maxPosition + 1,
              (basicEndPosition + query.maximumRight));
          if (startPosition <= (basicStartPosition - query.minimumLeft)
              && endPosition >= (basicEndPosition + query.minimumRight)) {
            return true;
          }
        }
        return false;
      }
    }