Stream<VcsRef> (@NotNull CompletionResultSet result, @NotNull Stream<VcsRef> stream) { Stream<VcsRef> matched = stream.filter(ref -> myRoots.contains(ref.getRoot()) && result.getPrefixMatcher().prefixMatches(ref.getName())); return filterRefs(matched); }