if (!(stmt.getRightOp() instanceof InterfaceInvokeExpr)) {
continue;
}
InterfaceInvokeExpr expr = (InterfaceInvokeExpr) stmt
.getRightOp();
if (expr.getMethod() != iteratorHasNextMethod) {
continue;
}
// At this point we know we have a while (hasNext()) loop.
// Now go check for iterator is defined... it should be just
// above
Local iteratorLocal = (Local) expr.getBase();
Block whilePredecessor = (Block) whileCond.getPreds().get(0);
if (whilePredecessor == block) {
whilePredecessor = (Block) whileCond.getPreds().get(1);
}