private void compareChildren(CompareContext context) {
    Set<String> legacyChildTypes = context.getLegacyDefinition().getChildTypes();
    Set<String> currentChildTypes = context.getCurrentDefinition().getChildTypes();

    compareSetsAndRemoveMissing(context, "child types", currentChildTypes, legacyChildTypes);

    for (String type : legacyChildTypes) {
      Map<String, ModelNode> legacyChildren = context.getLegacyDefinition().getChildren(type);
      Map<String, ModelNode> currentChildren = context.getCurrentDefinition().getChildren(type);

      compareKeySetsAndRemoveMissing(
          context, "child names for type=" + type, currentChildren, legacyChildren);

      for (Map.Entry<String, ModelNode> legacyChildEntry : legacyChildren.entrySet()) {
        String name = legacyChildEntry.getKey();
        ModelNode legacyChildDescription = legacyChildEntry.getValue();
        ModelNode currentChildDescription = currentChildren.get(name);

        CompareContext childContext;
        try {
          childContext =
              new CompareContext(
                  context.getRootAddress(),
                  context.getPathAddress().append(PathElement.pathElement(type, name)),
                  context.isCore(),
                  new ResourceDefinition(currentChildDescription, currentModelVersions),
                  new ResourceDefinition(legacyChildDescription, legacyModelVersions));
        } catch (RuntimeException e) {
          System.out.println(context.getPathAddress() + " + " + type + "=" + name);
          throw e;
        }
        compareModel(childContext);
      }
    }
  }