public static Statement isHead(Statement head) {

    if (head.type == StatementType.BASIC_BLOCK && head.getLastBasicType() == StatementType.IF) {
      int regsize = head.getSuccessorEdges(EdgeType.REGULAR).size();

      Statement p = null;

      boolean ok = (regsize < 2);
      if (!ok) {
        List<Statement> lst = new ArrayList<>();
        if (DecHelper.isChoiceStatement(head, lst)) {
          p = lst.remove(0);

          for (Statement st : lst) {
            if (st.isMonitorEnter()) {
              return null;
            }
          }

          ok = DecHelper.checkStatementExceptions(lst);
        }
      }

      if (ok) {
        return new IfStatement(head, regsize, p);
      }
    }

    return null;
  }
public static Statement isHead(Statement head)