int caseIndex = node.getChildIndex(caseNode);
for (int i = node.numChildren() - 1; i > caseIndex; i--) {
node.removeChild(i);
}
// Replace this child with a new SwitchDefaultNode.
SwitchDefaultNode newDefaultNode = new SwitchDefaultNode(nodeIdGen.genId());
newDefaultNode.addChildren(caseNode.getChildren());
node.replaceChild(caseIndex, newDefaultNode);
// Stop processing.
break;
} else if (hasAllNonmatchingConstants) {