docs: private boolean findMatches() throws IOException {
      // check for something in queue of matches
      if (!queueMatches.isEmpty()) {
        return true;
      } else {
        while (true) {
          // try to get something in queue of spans
          if (queueSpans.isEmpty() && !collectSpan()) {
            return false;
          }
          // try to get matches with first span in queue
          Match firstMatch = queueSpans.get(0);
          queueSpans.remove(0);
          // create a list of matches with same startposition as firstMatch
          List<Match> matches = new ArrayList<>();
          matches.add(firstMatch);
          // try to collect spans until lastStartPosition not equal to
          // startposition of firstMatch
          while (!lastSpan && (lastStartPosition == firstMatch.startPosition())) {
            collectSpan();
          }
          while (!queueSpans.isEmpty() && (queueSpans.get(0)
              .startPosition() == firstMatch.startPosition())) {
            matches.add(queueSpans.get(0));
            queueSpans.remove(0);
          }
          // construct all matches for this startposition
          for (Match match : matches) {
            // only unique spans
            if (!queueMatches.contains(match)) {
              queueMatches.add(match);
            }
          }
          // check for something in queue of matches
          if (!queueMatches.isEmpty()) {
            return true;
          }
        }
      }
    }