public static @NotNull Map<String, List<Configurable>> groupConfigurables(@NotNull List<? extends Configurable> configurables) {
    Map<String, Node<HierarchicalConfigurable>> tree = new HashMap<>();
    for (Configurable configurable : configurables) {
      if (!(configurable instanceof HierarchicalConfigurable hierarchical)) {
        Node.add(tree, OTHER_ID, configurable);
        continue;
      }

      String id;
      try {
        id = hierarchical.getId();
      }
      catch (ProcessCanceledException e) {
        throw e;
      }
      catch (Throwable e) {
        LOG.error("Cannot create configurable", e);
        continue;
      }

      Node<HierarchicalConfigurable> node = Node.get(tree, id);
      if (node.myValue != null) {
        LOG.warn("ignore configurable with duplicated id: " + id);
        continue;
      }

      String parentId = hierarchical.getParentId();

      if (hierarchical instanceof ConfigurableWrapper) {
        String groupId = ((ConfigurableWrapper)hierarchical).getExtensionPoint().groupId;
        if (groupId != null) {
          if (parentId != null) {
            LOG.warn("ignore deprecated groupId: " + groupId + " for id: " + id);
          }
          else {
            //TODO:LOG.warn("use deprecated groupId: " + groupId + " for id: " + id);
            parentId = groupId;
          }
        }
      }

      parentId = Node.cyclic(tree, parentId, OTHER_ID, id, node);
      node.myParent = Node.add(tree, parentId, node);
      node.myValue = hierarchical;
    }

    Map<String, List<Configurable>> map = new HashMap<>();
    for (String id : ArrayUtilRt.toStringArray(tree.keySet())) {
      Node<HierarchicalConfigurable> node = tree.get(id);
      if (node != null) {
        List<Configurable> list = getConfigurables(tree, node);
        if (list != null) {
          map.put(id, list);
          tree.remove(id);
        }
      }
    }
    return map;
  }
public static @NotNull Map<String, List<Configurable>> groupConfigurables(@NotNull List<? extends Configurable> configurables)