IntSet (@NotNull List<VcsLogDetailsFilter> detailsFilters, @Nullable IntSet candidates) { VcsLogTextFilter textFilter = ContainerUtil.findInstance(detailsFilters, VcsLogTextFilter.class); VcsLogUserFilter userFilter = ContainerUtil.findInstance(detailsFilters, VcsLogUserFilter.class); VcsLogStructureFilter pathFilter = ContainerUtil.findInstance(detailsFilters, VcsLogStructureFilter.class); IntSet filteredByUser = null; if (userFilter != null) { Set<VcsUser> users = new HashSet<>(); for (VirtualFile root : myProviders.keySet()) { users.addAll(userFilter.getUsers(root)); } filteredByUser = filterUsers(users); } IntSet filteredByPath = null; if (pathFilter != null) { filteredByPath = filterPaths(pathFilter.getFiles()); } IntSet filteredByUserAndPath = IntCollectionUtil.intersect(filteredByUser, filteredByPath, candidates); if (textFilter == null) { return filteredByUserAndPath == null ? IntSets.EMPTY_SET : filteredByUserAndPath; } return filterMessages(textFilter, filteredByUserAndPath); }