private static StringBuilder composeText(PsiElement @NotNull [] elements, final String pattern, StringBuilder result) {
    Set<String> names = new LinkedHashSet<>();
    for (PsiElement element : elements) {
      String methodName = ((PsiMethod)element).getName();
      PsiClass aClass = ((PsiMethod)element).getContainingClass();
      String className = aClass == null ? "" : ClassPresentationUtil.getNameForClass(aClass, true);
      names.add(MessageFormat.format(pattern, methodName, className));
    }

    @NonNls String sep = "";
    for (String name : names) {
      result.append(sep);
      sep = "<br>";
      result.append(name);
    }
    return result;
  }
private static StringBuilder composeText(PsiElement @NotNull [] elements, final String pattern, StringBuilder result)