Statement (Statement head) { if (head.getLastBasicType() != StatementType.GENERAL) { return null; } // at most one outgoing edge StatEdge edge = null; List<StatEdge> lstSuccs = head.getSuccessorEdges(EdgeType.DIRECT_ALL); if (!lstSuccs.isEmpty()) { edge = lstSuccs.get(0); } if (edge != null && edge.getType() == EdgeType.REGULAR) { Statement stat = edge.getDestination(); if (stat != head && stat.getPredecessorEdges(EdgeType.REGULAR).size() == 1 && !stat.isMonitorEnter()) { if (stat.getLastBasicType() == StatementType.GENERAL) { if (DecHelper.checkStatementExceptions(Arrays.asList(head, stat))) { return new SequenceStatement(head, stat); } } } } return null; }