ie = cfg.outgoingEdgeIterator(thenBB); while (ie.hasNext()) { Edge e = ie.next(); if (e.getType() == EdgeTypes.FALL_THROUGH_EDGE) { BasicBlock target = e.getTarget(); if (target.getFirstInstruction() == null) return findThenFinish(cfg, target, elsePos); int targetPos = target.getFirstInstruction().getPosition(); if (targetPos < elsePos) return findThenFinish(cfg, target, elsePos); }
InstructionHandle lastIns = inst; while (inst.getPosition() < elsePos) { lastIns = inst; inst = inst.getNext();
	private BasicBlock findThenFinish(CFG cfg, BasicBlock thenBB, int elsePos) {		//Follow fall thru links until we find a goto link past the else				Iterator<Edge> ie = cfg.outgoingEdgeIterator(thenBB);		while (ie.hasNext()) {			Edge e = ie.next();			if (e.getType() == EdgeTypes.GOTO_EDGE) {				InstructionHandle firstInsH = e.getTarget().getFirstInstruction();				if (firstInsH != null) {					int targetPos = firstInsH.getPosition();					if (targetPos > elsePos)						return e.getSource();				}			}		}				ie = cfg.outgoingEdgeIterator(thenBB);		while (ie.hasNext()) {			Edge e = ie.next();			if (e.getType() == EdgeTypes.FALL_THROUGH_EDGE) {				BasicBlock target = e.getTarget();				if (target.getFirstInstruction() == null)					return findThenFinish(cfg, target, elsePos);				int targetPos = target.getFirstInstruction().getPosition();				if (targetPos < elsePos)					return findThenFinish(cfg, target, elsePos);			}		}		return null;	}