code: private List<Pair<CObject>> getChildPairs(RmPath path, CAttribute parent, CAttribute specialized) {
          List<Pair<CObject>> result = new ArrayList<>();
          for (CObject parentChild : parent.getChildren()) {
              result.add(new Pair<>(parentChild, findSpecializedConstraintOfParentNode(specialized, parentChild)));
          }
          for (CObject specializedChild : specialized.getChildren()) {
              CObject parentChild = findParentConstraintOfSpecializedNode(parent, specializedChild.getNodeId());
              if (parentChild == null) {
  
                  int index = getOrderIndex(path, result, specializedChild);
  
                  if (index >= 0) {
                      result.add(index, new Pair<>(parentChild, specializedChild));
                  } else {
                      result.add(new Pair<>(parentChild, specializedChild));
                  }
  
              }
          }
          return result;
      }
docs: /* Returns matching (parent,specialized) pairs of children of an attribute, in the order they should be present in
  the flattened model. One of the element may be null in case of no specialization or extension.