if (redundantBranch.secondValue.wouldHaveBeenAKaboom()) wouldHaveBeenAKaboom = true;
if (redundantBranch.secondValue.wouldHaveBeenAKaboom()) { wouldHaveBeenAKaboom = true; locationOfKaBoom = redundantBranch.secondValue.getLocationOfKaBoom(); }
	public void foundRedundantNullCheck(Location location, RedundantBranch redundantBranch) {		String sourceFile = classContext.getJavaClass().getSourceFileName();		MethodGen methodGen = classContext.getMethodGen(method);				boolean isChecked = redundantBranch.firstValue.isChecked();		boolean wouldHaveBeenAKaboom = redundantBranch.firstValue.wouldHaveBeenAKaboom();		Location locationOfKaBoom = redundantBranch.firstValue.getLocationOfKaBoom();		 		boolean createdDeadCode = false;		boolean infeasibleEdgeSimplyThrowsException = false;		Edge infeasibleEdge = redundantBranch.infeasibleEdge;		if (infeasibleEdge != null) {			if (DEBUG) System.out.println("Check if " + redundantBranch + " creates dead code");			BasicBlock target = infeasibleEdge.getTarget();			if (DEBUG) System.out.println("Target block is  " + (target.isExceptionThrower() ? " exception thrower" : " not exception thrower"));			// If the block is empty, it probably doesn't matter that it was killed.			// FIXME: really, we should crawl the immediately reachable blocks			// starting at the target block to see if any of them are dead and nonempty.			boolean empty =  !target.isExceptionThrower() &&				(target.isEmpty() || isGoto(target.getFirstInstruction().getInstruction()));			if (!empty) {				try {				if (classContext.getCFG(method).getNumIncomingEdges(target) > 1) {					if (DEBUG) System.out.println("Target of infeasible edge has multiple incoming edges");					empty = true;				}}				catch (CFGBuilderException e) {					assert true; // ignore it				}			}			if (DEBUG) System.out.println("Target block is  " + (empty ? "empty" : "not empty"));			if (!empty) {				if (isThrower(target)) infeasibleEdgeSimplyThrowsException = true;					}			if (!empty && !previouslyDeadBlocks.get(target.getId())) {				if (DEBUG) System.out.println("target was alive previously");				// Block was not dead before the null pointer analysis.				// See if it is dead now by inspecting the null value frame.				// If it's TOP, then the block became dead.				IsNullValueFrame invFrame = invDataflow.getStartFact(target);				createdDeadCode = invFrame.isTop();				if (DEBUG) System.out.println("target is now " + (createdDeadCode ? "dead" : "alive"));			}		}				int priority;		boolean valueIsNull = true;		String warning;		if (redundantBranch.secondValue == null) {			if (redundantBranch.firstValue.isDefinitelyNull() ) {				warning = "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE";				priority = NORMAL_PRIORITY;			}			else {				warning = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE";				valueIsNull = false; 				priority = isChecked ? NORMAL_PRIORITY : LOW_PRIORITY;			}		} else {			boolean bothNull =  redundantBranch.firstValue.isDefinitelyNull() && redundantBranch.secondValue.isDefinitelyNull();					if (redundantBranch.secondValue.isChecked()) isChecked = true;			if (redundantBranch.secondValue.wouldHaveBeenAKaboom()) wouldHaveBeenAKaboom = true;			if (bothNull) {				warning = "RCN_REDUNDANT_COMPARISON_TWO_NULL_VALUES";				priority = NORMAL_PRIORITY;			}			else {				warning = "RCN_REDUNDANT_COMPARISON_OF_NULL_AND_NONNULL_VALUE";				priority = isChecked ? NORMAL_PRIORITY : LOW_PRIORITY;			}		}				if (wouldHaveBeenAKaboom) {			priority = HIGH_PRIORITY;			warning = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE";			if (locationOfKaBoom == null) throw new NullPointerException("location of KaBoom is null");		}				if (DEBUG) System.out.println(createdDeadCode + " " + infeasibleEdgeSimplyThrowsException + " " + valueIsNull + " " + priority);		if (createdDeadCode && !infeasibleEdgeSimplyThrowsException) {			priority += 0;		} else if (createdDeadCode && infeasibleEdgeSimplyThrowsException) {			// throw clause			if (valueIsNull) 				priority += 0;			else				priority += 1;		} else {			// didn't create any dead code			priority += 1;		}		if (DEBUG) {			System.out.println("RCN" + priority + " " 					+ redundantBranch.firstValue + " =? "					+ redundantBranch.secondValue 					+ " : " + warning 			);			if (isChecked) System.out.println("isChecked");			if (wouldHaveBeenAKaboom) System.out.println("wouldHaveBeenAKaboom");			if (createdDeadCode) System.out.println("createdDeadCode");		}				BugInstance bugInstance =			new BugInstance(this, warning, priority)				.addClassAndMethod(methodGen, sourceFile);		if (wouldHaveBeenAKaboom) 			bugInstance.addSourceLine(classContext, methodGen, sourceFile, locationOfKaBoom.getHandle());		bugInstance.addSourceLine(classContext, methodGen, sourceFile, location.getHandle()).describe("SOURCE_REDUNDANT_NULL_CHECK");				if (FindBugsAnalysisFeatures.isRelaxedMode()) {			WarningPropertySet propertySet = new WarningPropertySet();			WarningPropertyUtil.addPropertiesForLocation(propertySet, classContext, method, location);			if (isChecked) 				propertySet.addProperty(NullDerefProperty.CHECKED_VALUE);			if (wouldHaveBeenAKaboom) 				propertySet.addProperty(NullDerefProperty.WOULD_HAVE_BEEN_A_KABOOM);			if (createdDeadCode)				propertySet.addProperty(NullDerefProperty.CREATED_DEAD_CODE);						propertySet.decorateBugInstance(bugInstance);						priority = propertySet.computePriority(NORMAL_PRIORITY);			bugInstance.setPriority(priority);		}		bugReporter.reportBug(bugInstance);	}