private void filter(@Nullable IntIterable candidates,
                      @NotNull Predicate<String> condition,
                      @NotNull IntConsumer consumer) throws IOException {
    if (candidates == null) {
      myIndexStorageBackend.processMessages((commit, message) -> {
        if (message != null && condition.test(message)) {
          consumer.accept(commit);
        }
        return true;
      });
    }
    else {
      for (IntIterator iterator = candidates.iterator(); iterator.hasNext(); ) {
        int commit = iterator.nextInt();
        String value = myIndexStorageBackend.getMessage(commit);
        if (value != null && condition.test(value)) {
          consumer.accept(commit);
        }
      }
    }
  }
private void filter(@Nullable IntIterable candidates,
                      @NotNull Predicate<String> condition,
                      @NotNull IntConsumer consumer)