private static boolean extractLoop(DoStatement stat) {
    if (stat.getLoopType() != LoopType.DO) {
      return false;
    }

    for (StatEdge edge : stat.getLabelEdges()) {
      if (edge.getType() != EdgeType.CONTINUE && edge.getDestination().type != StatementType.DUMMY_EXIT) {
        return false;
      }
    }

    return extractLastIf(stat) || extractFirstIf(stat);
  }
private static boolean extractLoop(DoStatement stat)