private static List<BlockNode> cleanSuccessors(BlockNode block){
  List<BlockNode> sucList=block.getSuccessors();
  if (sucList.isEmpty()) {
    return sucList;
  }
  List<BlockNode> toRemove=new LinkedList<BlockNode>();
  for (  BlockNode b : sucList) {
    if (BlockUtils.isBlockMustBeCleared(b)) {
      toRemove.add(b);
    }
  }
  if (block.contains(AFlag.LOOP_END)) {
    List<LoopInfo> loops=block.getAll(AType.LOOP);
    for (    LoopInfo loop : loops) {
      toRemove.add(loop.getStart());
    }
  }
  IgnoreEdgeAttr ignoreEdgeAttr=block.get(AType.IGNORE_EDGE);
  if (ignoreEdgeAttr != null) {
    toRemove.addAll(ignoreEdgeAttr.getBlocks());
  }
  if (toRemove.isEmpty()) {
    return sucList;
  }
  List<BlockNode> result=new ArrayList<BlockNode>(sucList);
  result.removeAll(toRemove);
  return result;
}

private static List < BlockNode > cleanSuccessors ( BlockNode block ) { List < BlockNode > sucList = block . getSuccessors ( ) ; if ( sucList . isEmpty ( ) ) { return sucList ; } List < BlockNode > toRemove = new LinkedList < BlockNode > ( ) ; for ( BlockNode b : sucList ) { if ( BlockUtils . isBlockMustBeCleared ( b ) ) { toRemove . add ( b ) ; } } if ( block . contains ( AFlag . LOOP_END ) ) { List < LoopInfo > loops = block . getAll ( AType . LOOP ) ; for ( LoopInfo loop : loops ) { toRemove . add ( loop . getStart ( ) ) ; } } IgnoreEdgeAttr ignoreEdgeAttr = block . get ( AType . IGNORE_EDGE ) ; if ( ignoreEdgeAttr != null ) { toRemove . addAll ( ignoreEdgeAttr . getBlocks ( ) ) ; } if ( toRemove . isEmpty ( ) ) { return sucList ; } List < BlockNode > result = new ArrayList < BlockNode > ( sucList ) ; result . removeAll ( toRemove ) ; return result ; }
return all successor which are not exception handler or followed by loop back edge
