// Add all incoming edges.
for (int i = 0; i < graph.getInEdges(node).size(); ++i) {
CfgEdge edge = new CfgEdge();
newSubgraph.addIn(newNode, edge);
newSubgraph.addGraphInEdge(edge);
}
for (CfgEdge e : graph.getOutEdges(node)) {
CfgEdge edge = new CfgEdge(e.getRole());
newSubgraph.addGraphOutEdge(edge);