String (String varName, boolean allOccurences) { MultiMap<PsiElement, String> list = isOKImpl(varName, allOccurences); String result = ""; final String[] strings = ArrayUtilRt.toStringArray(list.values()); Arrays.sort(strings); for (String s : strings) { result = result + s.replaceAll("<b><code>", "").replaceAll("</code></b>", "") + "\n"; } if (!list.isEmpty()) { result = result.substring(0, result.length() - 1); } if (result.isEmpty()) { result = "ok"; } return result; }