LockDataflow lockDataflow = classContext.getLockDataflow(method); LockSet lockSet = lockDataflow.getFactAtLocation(location);
LockChecker lockChecker = classContext.getLockChecker(method); LockSet lockSet = lockChecker.getFactAtLocation(location);
	private Set<CallSite> findObviouslyLockedCallSites(ClassContext classContext, SelfCalls selfCalls)	        throws CFGBuilderException, DataflowAnalysisException {		ConstantPoolGen cpg = classContext.getConstantPoolGen();		// Find all obviously locked call sites		HashSet<CallSite> obviouslyLockedSites = new HashSet<CallSite>();		for (Iterator<CallSite> i = selfCalls.callSiteIterator(); i.hasNext();) {			CallSite callSite = i.next();			Method method = callSite.getMethod();			Location location = callSite.getLocation();			InstructionHandle handle = location.getHandle();			// Only instance method calls qualify as candidates for			// "obviously locked"			Instruction ins = handle.getInstruction();			if (ins.getOpcode() == Constants.INVOKESTATIC)				continue;			// Get lock set for site			LockDataflow lockDataflow = classContext.getLockDataflow(method);			LockSet lockSet = lockDataflow.getFactAtLocation(location);			// Get value number frame for site			ValueNumberDataflow vnaDataflow = classContext.getValueNumberDataflow(method);			ValueNumberFrame frame = vnaDataflow.getFactAtLocation(location);			// NOTE: if the CFG on which the value number analysis was performed			// was pruned, there may be unreachable instructions.  Therefore,			// we can't assume the frame is valid.			if (!frame.isValid())				continue;			// Find the ValueNumber of the receiver object			int numConsumed = ins.consumeStack(cpg);			if (numConsumed == Constants.UNPREDICTABLE)				throw new AnalysisException("Unpredictable stack consumption: " + handle);			//if (DEBUG) System.out.println("Getting receiver for frame: " + frame);			ValueNumber instance = frame.getStackValue(numConsumed - 1);			// Is the instance locked?			int lockCount = lockSet.getLockCount(instance.getNumber());			if (lockCount > 0) {				// This is a locked call site				obviouslyLockedSites.add(callSite);			}		}		return obviouslyLockedSites;	}