boolean wantSame = (lastHandle.getInstruction().getOpcode() == Constants.IF_ACMPEQ); int infeasibleEdgeType = (wantSame == definitelySame) ? EdgeTypes.IFCMP_EDGE : EdgeTypes.FALL_THROUGH_EDGE; Edge infeasibleEdge = invDataflow.getCFG().getOutgoingEdgeWithType(basicBlock, infeasibleEdgeType); redundantBranch.setInfeasibleEdge(infeasibleEdge);
	private void analyzeRefComparisonBranch(			BasicBlock basicBlock,			InstructionHandle lastHandle) throws DataflowAnalysisException {				Location location = new Location(lastHandle, basicBlock);		IsNullValueFrame frame = invDataflow.getFactAtLocation(location);		if (!frame.isValid()) {			// Probably dead code due to pruning infeasible exception edges.			return;		}		if (frame.getStackDepth() < 2)			throw new DataflowAnalysisException("Stack underflow at " + lastHandle);		// Find the line number.		int lineNumber = getLineNumber(method, lastHandle);		if (lineNumber < 0)			return;		int numSlots = frame.getNumSlots();		IsNullValue top = frame.getValue(numSlots - 1);		IsNullValue topNext = frame.getValue(numSlots - 2);		boolean definitelySame = top.isDefinitelyNull() && topNext.isDefinitelyNull();		boolean definitelyDifferent =		        (top.isDefinitelyNull() && topNext.isDefinitelyNotNull()) ||		        (top.isDefinitelyNotNull() && topNext.isDefinitelyNull());		if (definitelySame || definitelyDifferent) {			if (definitelySame) {				if (DEBUG) System.out.println("Line " + lineNumber + " always same");				definitelySameBranchSet.set(lineNumber);			}			if (definitelyDifferent) {				if (DEBUG) System.out.println("Line " + lineNumber + " always different");				definitelyDifferentBranchSet.set(lineNumber);			}			//reportRedundantNullCheck(classContext, method, lastHandle);			RedundantBranch redundantBranch = new RedundantBranch(location, lineNumber, top, topNext);			if (DEBUG) System.out.println("Adding redundant branch: " + redundantBranch);			redundantBranchList.add(redundantBranch);		} else {			if (DEBUG) System.out.println("Line " + lineNumber + " undetermined");			undeterminedBranchSet.set(lineNumber);		}	}