for (ApacheDirective node : nodes.nodesToPromote) {
int nodeIdx = parentNode.getChildDirectives().indexOf(node);
List<ApacheDirective> childNodes = node.getChildDirectives();
for (int i = childNodes.size() - 1; i >= 0; --i) {
ApacheDirective childNode = childNodes.get(i);
parentNode.getChildDirectives().add(nodeIdx, childNode);
childNode.setParentNode(parentNode);
}
parentNode.getChildDirectives().remove(nodeIdx + childNodes.size());
}
}