Collection<VirtualFile> (@NotNull String detectorId, @NotNull Collection<? extends VirtualFile> files) { synchronized (myLock) { IntSet existentFilesSet = null; try { existentFilesSet = myExistentFrameworkFiles.get(detectorId); } catch (IOException e) { LOG.info(e); } List<VirtualFile> newFiles = new ArrayList<>(); for (VirtualFile file : files) { final int fileId = FileBasedIndex.getFileId(file); if (existentFilesSet == null || !existentFilesSet.contains(fileId)) { newFiles.add(file); } } return newFiles; } }