void (@NotNull Map<StatEdge, Integer> edgeIndicesMapping, @NotNull List<@Nullable Statement> nodes, @NotNull List<List<Integer>> edgeIndices) { List<StatEdge> firstExitEdges = first.getSuccessorEdges(EdgeType.BREAK.unite(EdgeType.CONTINUE)); while (!firstExitEdges.isEmpty()) { StatEdge exitEdge = firstExitEdges.get(0); List<Integer> exitEdgeIndices = new ArrayList<>(); for (int i = firstExitEdges.size() - 1; i >= 0; i--) { StatEdge edgeTemp = firstExitEdges.get(i); if (edgeTemp.getDestination() == exitEdge.getDestination() && edgeTemp.getType() == exitEdge.getType()) { exitEdgeIndices.add(edgeIndicesMapping.get(edgeTemp)); firstExitEdges.remove(i); } } Collections.sort(exitEdgeIndices); nodes.add(null); edgeIndices.add(exitEdgeIndices); } }