void (@NotNull Project project, @NotNull Map<PsiElement, AnnotationPlace> placedElement, @NotNull TaintValueFactory taintValueFactory) { MultiMap<PsiElement, String> problems = new MultiMap<>(); ArrayList<PsiElement> toAnnotate = new ArrayList<>(); for (Map.Entry<PsiElement, AnnotationPlace> entry : placedElement.entrySet()) { PsiElement element = entry.getKey(); AnnotationPlace annotationPlace = entry.getValue(); if (annotationPlace != AnnotationPlace.IN_CODE) { String message; if (element instanceof JvmField || element instanceof JvmMethod) { message = JvmAnalysisBundle.message("jvm.inspections.source.unsafe.to.sink.flow.config", getRepresentText(element)); } else { message = JvmAnalysisBundle.message("jvm.inspections.source.unsafe.to.sink.flow.impossible", getRepresentText(element)); } problems.put(element, List.of(message)); } else { toAnnotate.add(element); } } ArrayList<PsiElement> ignoredElements = new ArrayList<>(); annotateInCode(project, toAnnotate, taintValueFactory, false, ignoredElements); for (PsiElement element : ignoredElements) { if (element instanceof JvmField || element instanceof JvmMethod) { placedElement.put(element, AnnotationPlace.EXTERNAL); String message = JvmAnalysisBundle.message("jvm.inspections.source.unsafe.to.sink.flow.config", getRepresentText(element)); problems.put(element, List.of(message)); } else { String message = JvmAnalysisBundle.message("jvm.inspections.source.unsafe.to.sink.flow.impossible", getRepresentText(element)); problems.put(element, List.of(message)); } } if (!problems.isEmpty()) { ConflictsDialog conflictsDialog = new ConflictsDialog(project, problems); if (!conflictsDialog.showAndGet()) { return; } } run(project, placedElement, taintValueFactory); }