int (@NotNull Statement currentStatement) { Statement dummy = currentStatement.getSimpleCopy(); int statIndex = stats.indexOf(currentStatement); if (statIndex < 0) { return statIndex; } stats.addWithKeyAndIndex(statIndex + 1, dummy, dummy.id); int caseIndex = caseStatements.indexOf(currentStatement); caseStatements.add(caseIndex + 1, dummy); List<@Nullable Exprent> toCopyValues = caseValues.get(caseIndex); caseValues.add(caseIndex + 1, toCopyValues); List<StatEdge> previousEdges = caseEdges.get(caseIndex); List<StatEdge> toCopyEdges = new ArrayList<>(); for (StatEdge previousEdge : previousEdges) { StatEdge edge = previousEdge.copy(); edge.setDestination(dummy); toCopyEdges.add(edge); } caseEdges.add(caseIndex + 1, toCopyEdges); for (StatEdge edge : currentStatement.getAllPredecessorEdges()) { StatEdge copy = edge.copy(); copy.setDestination(dummy); copy.getSource().addSuccessor(copy); } for (StatEdge edge : currentStatement.getAllSuccessorEdges()) { StatEdge copy = edge.copy(); copy.setSource(dummy); dummy.addSuccessor(copy); } dummy.setParent(this); return caseIndex + 1; }