static boolean containsTagsWithSameName(PsiElement[] elements) {
    final Set<String> names = new HashSet<>();

    for (PsiElement element : elements) {
      if (element instanceof XmlTag) {
        final String name = ((XmlTag)element).getName();
        if (!names.add(name)) {
          return true;
        }
      }
    }

    return false;
  }
static boolean containsTagsWithSameName(PsiElement[] elements)