JavaClassAndMethod callTarget = Hierarchy.findInvocationLeastUpperBound( invokeInstruction, cpg); if (callTarget == null)
final List<NonNullSpecification> specificationList = new LinkedList<NonNullSpecification>(); JavaClassAndMethodChooser nonNullContractCollector = new JavaClassAndMethodChooser() { public boolean choose(JavaClassAndMethod classAndMethod) { XMethod xmethod = XMethodFactory.createXMethod( classAndMethod.getJavaClass(), classAndMethod.getMethod());  NonNullSpecification specification = new NonNullSpecification( classAndMethod, wrapProperty(nonNullParamDatabase.get().getProperty(xmethod)), wrapProperty(possiblyNullParamDatabase.get().getProperty(xmethod))); specificationList.add(specification);  return false; } };   int numParams = new SignatureParser(method.getSignature()).getNumParameters(); Hierarchy.findInvocationLeastUpperBound(invokeInstruction, cpg, nonNullContractCollector); BitSet checkedParams = new BitSet(); BitSet violatedParamSet = new BitSet(); List<NonNullParamViolation> violationList = new LinkedList<NonNullParamViolation>(); for (NonNullSpecification specification : specificationList) { for (int i = 0; i < numParams; ++i) { if (!nullArgSet.get(i) || checkedParams.get(i)) continue;    if (specification.possiblyNullProperty.isNonNull(i)) {   checkedParams.set(i); } else if (specification.nonNullProperty.isNonNull(i)) {   violationList.add(new NonNullParamViolation(specification.classAndMethod, i)); violatedParamSet.set(i); checkedParams.set(i); } } } if (violationList.isEmpty())
	private void checkNonNullParam(			Location location, 			ConstantPoolGen cpg,			TypeDataflow typeDataflow,			InvokeInstruction invokeInstruction,			BitSet nullArgSet,			BitSet definitelyNullArgSet) throws ClassNotFoundException {//		List<NonNullSpecification> specificationList = new LinkedList<NonNullSpecification>();//		//		JavaClassAndMethodChooser nonNullContractCollector = new JavaClassAndMethodChooser() {//			public boolean choose(JavaClassAndMethod classAndMethod) {//				XMethod xmethod = XMethodFactory.createXMethod(//						classAndMethod.getJavaClass(), classAndMethod.getMethod());//				////				NonNullParamProperty nonNullProperty = nonNullParamDatabase.getProperty(xmethod);//				//				return false;//			}//		};				JavaClassAndMethod callTarget = Hierarchy.findInvocationLeastUpperBound(				invokeInstruction,				cpg);		if (callTarget == null)			return;				XMethod xmethod = XMethodFactory.createXMethod(				callTarget.getJavaClass(), callTarget.getMethod());				if (DEBUG_NULLARG) {			System.out.println("Call " + xmethod);		}				NonNullParamProperty property = nonNullParamDatabase.get().getProperty(xmethod);		if (property == null)			return;				if (DEBUG_NULLARG) {			System.out.println("Property=" + property);		}				BitSet violatedParamSet = property.getViolatedParamSet(nullArgSet);		if (violatedParamSet.isEmpty())			return;		if (DEBUG_NULLARG) {			System.out.println("Violated params: " + violatedParamSet);		}				WarningPropertySet propertySet = new WarningPropertySet();		MethodGen methodGen = classContext.getMethodGen(method);		String sourceFile = classContext.getJavaClass().getSourceFileName();		BugInstance warning = new BugInstance("NP_NONNULL_PARAM_VIOLATION", NORMAL_PRIORITY)			.addClassAndMethod(methodGen, sourceFile)			.addSourceLine(methodGen, sourceFile, location.getHandle())			.addMethod(xmethod).describe("METHOD_CALLED");				addParamAnnotations(definitelyNullArgSet, violatedParamSet, propertySet, warning);				finishWarning(location, propertySet, warning);				bugReporter.reportBug(warning);	}