BugInstance instance = new BugInstance("RC_REF_COMPARISON", NORMAL_PRIORITY)
BugInstance instance = new BugInstance(this, "RC_REF_COMPARISON", NORMAL_PRIORITY)
	private void checkRefComparison(Location location, JavaClass jclass, MethodGen methodGen,	                                TypeDataflow typeDataflow) throws DataflowAnalysisException {		InstructionHandle handle = location.getHandle();		TypeFrame frame = typeDataflow.getFactAtLocation(location);		if (frame.getStackDepth() < 2)			throw new DataflowAnalysisException("Stack underflow", methodGen, handle);		int numSlots = frame.getNumSlots();		Type lhsType = frame.getValue(numSlots - 1);		Type rhsType = frame.getValue(numSlots - 2);		if (lhsType instanceof ReferenceType && rhsType instanceof ReferenceType) {			String lhs = SignatureConverter.convert(lhsType.getSignature());			String rhs = SignatureConverter.convert(rhsType.getSignature());			if (!lhs.equals(rhs))				return;			if (lhs.equals("java.lang.String") && rhs.equals("java.lang.String")) {				if (DEBUG)					System.out.println("String/String comparison at " +					        handle);				// Compute the priority:				// - two static strings => do not report				// - dynamic string and anything => high				// - static string and unknown => medium				// - all other cases => low				int priority = NORMAL_PRIORITY;				// System.out.println("Compare " + lhsType + " == " + rhsType);				byte type1 = lhsType.getType();				byte type2 = rhsType.getType();				// T1 T2 result				// S  S  no-op				// D  ?  high				// ?  D  high				// S  ?  normal				// ?  S  normal				if (type1 == T_STATIC_STRING && type2 == T_STATIC_STRING)					priority = LOW_PRIORITY + 1;				else if (type1 == T_DYNAMIC_STRING || type2 == T_DYNAMIC_STRING)					priority = HIGH_PRIORITY;				else if (type1 == T_STATIC_STRING || type2 == T_STATIC_STRING)					priority = LOW_PRIORITY;				else if (sawStringIntern)					priority = LOW_PRIORITY;				if (priority <= LOW_PRIORITY) {					String sourceFile = jclass.getSourceFileName();					BugInstance instance =					        new BugInstance("ES_COMPARING_STRINGS_WITH_EQ", priority)					        .addClassAndMethod(methodGen, sourceFile)					        .addSourceLine(methodGen, sourceFile, handle)					        .addClass("java.lang.String").describe("CLASS_REFTYPE");					if (REPORT_ALL_REF_COMPARISONS)						bugReporter.reportBug(instance);					else if (stringComparison == null || priority < stringComparison.getPriority())						stringComparison = instance;				}			} else if (suspiciousSet.contains(lhs) && suspiciousSet.contains(rhs)) {				String sourceFile = jclass.getSourceFileName();				BugInstance instance = new BugInstance("RC_REF_COMPARISON", NORMAL_PRIORITY)				        .addClassAndMethod(methodGen, sourceFile)				        .addSourceLine(methodGen, sourceFile, handle)				        .addClass(lhs).describe("CLASS_REFTYPE");				if (REPORT_ALL_REF_COMPARISONS)					bugReporter.reportBug(instance);				else if (refComparison == null)					refComparison = instance;			}		}	}