List<CodeSmellInfo> (@NotNull Map<Document, List<HighlightInfo>> highlights) { List<CodeSmellInfo> result = new ArrayList<>(); for (Map.Entry<Document, List<HighlightInfo>> e : highlights.entrySet()) { Document document = e.getKey(); List<HighlightInfo> infos = e.getValue(); for (HighlightInfo info : infos) { final HighlightSeverity severity = info.getSeverity(); if (SeverityRegistrar.getSeverityRegistrar(myProject).compare(severity, HighlightSeverity.WARNING) >= 0) { result.add(new CodeSmellInfo(document, getDescription(info), new TextRange(info.startOffset, info.endOffset), severity)); } } } return result; }