public static BlockNode traverseWhileDominates(BlockNode dom,BlockNode start){
  for (  BlockNode node : start.getCleanSuccessors()) {
    if (!node.isDominator(dom)) {
      return node;
    }
 else {
      BlockNode out=traverseWhileDominates(dom,node);
      if (out != null) {
        return out;
      }
    }
  }
  return null;
}

public static BlockNode traverseWhileDominates ( BlockNode dom , BlockNode start ) { for ( BlockNode node : start . getCleanSuccessors ( ) ) { if ( ! node . isDominator ( dom ) ) { return node ; } else { BlockNode out = traverseWhileDominates ( dom , node ) ; if ( out != null ) { return out ; } } } return null ; }
search for first node which not dominated by dom , starting from start
