String sourceFile = jclass.getSourceFileName(); bugReporter.reportBug(new BugInstance("RC_SUSPCIOUS_EQUALS", priority) .addClassAndMethod(methodGen, sourceFile) .addSourceLine(methodGen, sourceFile, location.getHandle()) .addClass(lhsType.getClassName()).describe("CLASS_REFTYPE") .addClass(rhsType.getClassName()).describe("CLASS_REFTYPE")
if (priority <= LOW_PRIORITY) { bugReporter.reportBug(new BugInstance("EC_UNRELATED_TYPES", priority) .addClassAndMethod(methodGen, sourceFile) .addSourceLine(methodGen, sourceFile, location.getHandle()) .addClass(lhsType.getClassName()).describe("CLASS_REFTYPE") .addClass(rhsType.getClassName()).describe("CLASS_REFTYPE")
	private void checkEqualsComparison(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 - 2);		Type rhsType_ = frame.getValue(numSlots - 1);		if (lhsType_.equals(rhsType_))			return;		if (!(lhsType_ instanceof ReferenceType) || !(rhsType_ instanceof ReferenceType)) {			bugReporter.logError("equals() used to compare non-object type(s) in " +				SignatureConverter.convertMethodSignature(methodGen) +				" at " + location.getHandle());			return;		}		// For now, ignore the case where either reference is not		// of an object type.  (It could be either an array or null.)		if (!(lhsType_ instanceof ObjectType) || !(rhsType_ instanceof ObjectType))			return;		ObjectType lhsType = (ObjectType) lhsType_;		ObjectType rhsType = (ObjectType) rhsType_;		int priority = LOW_PRIORITY;		// If neither object is a subtype of the other,		// make it medium priority		try {			if (!Hierarchy.isSubtype(lhsType, rhsType) &&				!Hierarchy.isSubtype(rhsType, lhsType))				priority = NORMAL_PRIORITY;		} catch (ClassNotFoundException e) {			bugReporter.reportMissingClass(e);			return;		}		String sourceFile = jclass.getSourceFileName();		bugReporter.reportBug(new BugInstance("RC_SUSPCIOUS_EQUALS", priority)			.addClassAndMethod(methodGen, sourceFile)			.addSourceLine(methodGen, sourceFile, location.getHandle())			.addClass(lhsType.getClassName()).describe("CLASS_REFTYPE")			.addClass(rhsType.getClassName()).describe("CLASS_REFTYPE")			);	}