void () { orderStatements(); colOrderedIDoms.putWithKey(statement.getFirst().id, statement.getFirst().id); // exclude first statement List<Integer> lstIds = colOrderedIDoms.getLstKeys().subList(1, colOrderedIDoms.getLstKeys().size()); while (true) { boolean changed = false; for (Integer id : lstIds) { Statement stat = statement.getStats().getWithKey(id); Integer idom = null; for (StatEdge edge : stat.getAllPredecessorEdges()) { if (colOrderedIDoms.getWithKey(edge.getSource().id) != null) { idom = getCommonIDom(idom, edge.getSource().id, colOrderedIDoms); } } Integer oldidom = colOrderedIDoms.putWithKey(idom, id); if (!idom.equals(oldidom)) { changed = true; } } if (!changed) { break; } } }