@Override
  public @NotNull Map<TodoIndexEntry, Integer> map(final @NotNull FileContent inputData) {
    final IndexPattern[] indexPatterns = IndexPatternUtil.getIndexPatterns();
    if (indexPatterns.length <= 0) return Collections.emptyMap();

    String chars = inputData.getContentAsText().toString(); // matching strings is faster than HeapCharBuffer
    OccurrenceConsumer occurrenceConsumer = new OccurrenceConsumer(null, true);
    for (IndexPattern indexPattern : indexPatterns) {
      if (!idIndexContainAllWords(indexPattern.getWordsToFindFirst(), indexPattern.isCaseSensitive(), inputData)) {
        continue;
      }

      Pattern pattern = indexPattern.getOptimizedIndexingPattern();
      try {
        if (pattern != null) {
          Matcher matcher = pattern.matcher(StringPattern.newBombedCharSequence(chars));
          while (matcher.find()) {
            if (matcher.start() != matcher.end()) {
              occurrenceConsumer.incTodoOccurrence(indexPattern);
            }
          }
        }
      }
      catch (StackOverflowError error) {
        LOG.error(error);
      }
    }
    Map<TodoIndexEntry, Integer> map = new HashMap<>();
    for (IndexPattern indexPattern : indexPatterns) {
      final int count = occurrenceConsumer.getOccurrenceCount(indexPattern);
      if (count > 0) {
        map.put(new TodoIndexEntry(indexPattern.getPatternString(), indexPattern.isCaseSensitive()), count);
      }
    }
    return map;
  }
@Override
  public @NotNull Map<TodoIndexEntry, Integer> map(final @NotNull FileContent inputData)