void (@NotNull Map<StatEdge, Integer> edgeIndicesMapping, @NotNull List<@Nullable Statement> nodes, @NotNull List<List<Integer>> edgeIndices) { for (int i = 1; i < stats.size(); i++) { Statement statement = stats.get(i); List<Integer> regularEdgeIndices = new ArrayList<>(); for (StatEdge regularEdge : statement.getPredecessorEdges(EdgeType.REGULAR)) { if (regularEdge.getSource() == first) { regularEdgeIndices.add(edgeIndicesMapping.get(regularEdge)); } } Collections.sort(regularEdgeIndices); nodes.add(statement); edgeIndices.add(regularEdgeIndices); } }