void (PsiDocTag @NotNull [] tags, @NotNull ProblemsHolder holder) { Set<String> documentedParamNames = null; Set<String> documentedExceptions = null; Set<String> uniqueTags = null; for (PsiDocTag tag : tags) { if ("param".equals(tag.getName())) { PsiDocTagValue value = tag.getValueElement(); if (value instanceof PsiDocParamRef) { PsiReference reference = value.getReference(); if (reference != null) { String paramName = reference.getCanonicalText(); if(((PsiDocParamRef)value).isTypeParamRef()){ paramName = "<" + paramName + ">"; } documentedParamNames = set(documentedParamNames); if (!documentedParamNames.add(paramName)) { holder.registerProblem(tag.getNameElement(), JavaBundle.message("inspection.javadoc.problem.duplicate.param", paramName)); } } } } else if (!IGNORE_THROWS_DUPLICATE && ("throws".equals(tag.getName()) || "exception".equals(tag.getName()))) { PsiDocTagValue value = tag.getValueElement(); if (value != null) { PsiElement firstChild = value.getFirstChild(); if (firstChild != null && firstChild.getFirstChild() instanceof PsiJavaCodeReferenceElement refElement) { PsiElement element = refElement.resolve(); if (element instanceof PsiClass psiClass) { String fqName = psiClass.getQualifiedName(); documentedExceptions = set(documentedExceptions); if (!documentedExceptions.add(fqName)) { holder.registerProblem(tag.getNameElement(), JavaBundle.message("inspection.javadoc.problem.duplicate.throws", fqName)); } } } } } else if (UNIQUE_TAGS.contains(tag.getName())) { uniqueTags = set(uniqueTags); if (!uniqueTags.add(tag.getName())) { holder.registerProblem(tag.getNameElement(), JavaBundle.message("inspection.javadoc.problem.duplicate.tag", tag.getName())); } } } }