private void removePathsUnderOtherRoots(@NotNull Collection<FilePath> untrackedFiles, @NonNls String type) {
    ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);

    int removedFiles = 0;
    int maxFilesToReport = 10;

    Iterator<FilePath> it = untrackedFiles.iterator();
    while (it.hasNext()) {
      FilePath filePath = it.next();
      VirtualFile root = vcsManager.getVcsRootFor(filePath);
      if (myRoot.equals(root)) continue;

      it.remove();
      removedFiles++;
      if (removedFiles < maxFilesToReport) {
        LOG.debug(String.format("Ignoring %s file under another root: %s; root: %s; mapped root: %s",
                                type, filePath.getPresentableUrl(), myRoot.getPresentableUrl(),
                                root != null ? root.getPresentableUrl() : "null"));
      }
    }
    if (removedFiles >= maxFilesToReport) {
      LOG.debug(String.format("Ignoring %s files under another root: %s files total", type, removedFiles));
    }
  }
private void removePathsUnderOtherRoots(@NotNull Collection<FilePath> untrackedFiles, @NonNls String type)