@Override
  public ProblemDescriptor @Nullable [] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager,
                                                  boolean isOnTheFly) {
    if (!(file instanceof IgnoreFile)) {
      return null;
    }

    ProblemsHolder problemsHolder = new ProblemsHolder(manager, file, isOnTheFly);
    MultiMap<String, IgnoreEntry> entries = MultiMap.create();

    file.acceptChildren(new IgnoreVisitor() {
      @Override
      public void visitEntry(@NotNull IgnoreEntry entry) {
        entries.putValue(entry.getText(), entry);
        super.visitEntry(entry);
      }
    });

    for (Map.Entry<String, Collection<IgnoreEntry>> stringCollectionEntry : entries.entrySet()) {
      Iterator<IgnoreEntry> iterator = stringCollectionEntry.getValue().iterator();
      iterator.next();
      while (iterator.hasNext()) {
        IgnoreEntry entry = iterator.next();
        problemsHolder.registerProblem(entry, VcsBundle.message("ignore.codeInspection.duplicateEntry.message"),
                                       new IgnoreFileRemoveEntryFix(entry));
      }
    }

    return problemsHolder.getResultsArray();
  }
@Override
  public ProblemDescriptor @Nullable [] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager,
                                                  boolean isOnTheFly)