if (!typeFrame.isValid()) return; Type receiverType = typeFrame.getInstance(invokeInstruction, cpg); if (!(receiverType instanceof ReferenceType)) return;     Set<XMethod> targetMethodSet = Hierarchy.resolveMethodCallTargets( (ReferenceType) receiverType, invokeInstruction, cpg);
Set<XMethod> targetMethodSet = Hierarchy.resolveMethodCallTargets(invokeInstruction, typeFrame, cpg);
	private void examineLocation(Location location, ConstantPoolGen cpg, TypeDataflow typeDataflow, UnconditionalDerefPropertyDatabase database)			throws DataflowAnalysisException, CFGBuilderException, ClassNotFoundException {		if (!(location.getHandle().getInstruction() instanceof InvokeInstruction))			return;				InvokeInstruction invokeInstruction = (InvokeInstruction)			location.getHandle().getInstruction();				if (DEBUG_NULLARG) {			System.out.println("Examining call site: " + location.getHandle());		}				String signature = invokeInstruction.getSignature(cpg); 		int returnTypeStart = signature.indexOf(')');		if (returnTypeStart < 0)			return;		String paramList = signature.substring(0, returnTypeStart + 1);				if (paramList.equals("()") ||				(paramList.indexOf("L") < 0 && paramList.indexOf('[') < 0))			// Method takes no arguments, or takes no reference arguments			return;		// See if any null arguments are passed		IsNullValueFrame frame =			classContext.getIsNullValueDataflow(method).getFactAtLocation(location);		if (!frame.isValid())			return;		BitSet nullArgSet = frame.getNullArgumentSet(invokeInstruction, cpg);		if (nullArgSet.isEmpty())			return;		if (DEBUG_NULLARG) {			System.out.println("Null arguments passed: " + nullArgSet);		}				// Get the receiver object type		TypeFrame typeFrame = typeDataflow.getFactAtLocation(location);		if (!typeFrame.isValid())			return;		Type receiverType = typeFrame.getInstance(invokeInstruction, cpg);		if (!(receiverType instanceof ReferenceType))			return;				// TODO: receiver type might be exact				// See what methods might be called here		Set<XMethod> targetMethodSet = Hierarchy.resolveMethodCallTargets(				(ReferenceType) receiverType,				invokeInstruction,				cpg);		if (DEBUG_NULLARG) {			System.out.println("Possibly called methods: " + targetMethodSet);		}				// See if any call targets unconditionally dereference one of the null arguments		BitSet unconditionallyDereferencedNullArgSet = new BitSet();		List<CallTarget> dangerousCallTargetList = new LinkedList<CallTarget>();		for (XMethod targetMethod : targetMethodSet) {			if (DEBUG_NULLARG) {				System.out.println("For target method " + targetMethod);			}						UnconditionalDerefProperty property = database.getProperty(targetMethod);			if (property == null)				continue;			if (DEBUG_NULLARG) {				System.out.println("\tUnconditionally dereferenced params: " + property);			}						BitSet targetUnconditionallyDereferencedNullArgSet =				property.getUnconditionallyDereferencedNullArgSet(nullArgSet);						if (targetUnconditionallyDereferencedNullArgSet.isEmpty())				continue;						JavaClass targetClass = AnalysisContext.currentAnalysisContext().lookupClass(targetMethod.getClassName());			dangerousCallTargetList.add(new CallTarget(targetClass, targetMethod));						unconditionallyDereferencedNullArgSet.or(targetUnconditionallyDereferencedNullArgSet);		}				if (dangerousCallTargetList.isEmpty())			return;				MethodGen methodGen = classContext.getMethodGen(method);		String sourceFile = classContext.getJavaClass().getSourceFileName();		BugInstance warning = new BugInstance("NP_NULL_PARAM_DEREF", NORMAL_PRIORITY)				.addClassAndMethod(methodGen, sourceFile)				.addSourceLine(methodGen, sourceFile, location.getHandle());		for (int i = 0; i < 32; ++i) {			if (unconditionallyDereferencedNullArgSet.get(i)) {				// Note: we report params as being indexed starting from 1, not 0				warning.addInt(i + 1).describe("INT_NULL_PARAM");			}		}		for (CallTarget dangerousCallTarget : dangerousCallTargetList) {			MethodAnnotation calledMethod = MethodAnnotation.fromXMethod(dangerousCallTarget.xmethod);			SourceLineAnnotation methodSourceLines = SourceLineAnnotation.forEntireMethod(					dangerousCallTarget.javaClass,					dangerousCallTarget.xmethod);			calledMethod.setSourceLines(methodSourceLines);			warning.addMethod(calledMethod).describe("METHOD_CALL_TARGET");		}				bugReporter.reportBug(warning);	}