void (AnnotationHolder holder, @NotNull GrModifierList list, PsiMember member) { final PsiElement[] modifiers = list.getModifiers(); Set<String> set = new HashSet<>(modifiers.length); for (PsiElement modifier : modifiers) { if (modifier instanceof GrAnnotation) continue; @GrModifier.GrModifierConstant String name = modifier.getText(); if (set.contains(name)) { String message = GroovyBundle.message("duplicate.modifier", name); AnnotationBuilder builder = holder.newAnnotation(HighlightSeverity.ERROR, message).range(list); if (member != null) { builder = registerLocalFix(builder, new GrModifierFix(member, name, false, false, GrModifierFix.MODIFIER_LIST), list, message, ProblemHighlightType.ERROR, list.getTextRange()); } builder.create(); } else { set.add(name); } } }