}
Location location = new Location(handle, block);
// Keep track of whether we saw any instructions
// that might actually have created a new object.
Instruction ins = handle.getInstruction();
if (DEBUG) {
System.out.println(location);
}
if (ins instanceof AllocationInstruction) {
sawNEW = true;
} else if (ins instanceof InvokeInstruction) {
if (ins instanceof INVOKESTATIC
&& ((INVOKESTATIC) ins).getMethodName(classContext.getConstantPoolGen()).startsWith("new")) {
sawNEW = true;
}
sawINVOKE = true;
}
// Compute lock set intersection for all matched
// instructions.
LockSet insLockSet = lockDataflow.getFactAtLocation(location);
if (lockSet == null) {
lockSet = new LockSet();
lockSet.copyFrom(insLockSet);
} else {
lockSet.intersectWith(insLockSet);
}
}
}
if (!(sawNEW || sawINVOKE)) {
return;
}
if (lockSet == null) {
throw new IllegalStateException("lock set is null");
}
if (!lockSet.isEmpty()) {
return;
}
boolean sawGetStaticAfterPutStatic = false;
check: if (signature.startsWith("[") || signature.startsWith("L")) {
BitSet postStore = domAnalysis.getAllDominatedBy(store.getBasicBlock());
for (BasicBlock block : cfg.getBlocks(postStore)) {
for (Iterator<InstructionHandle> j = block.instructionIterator(); j.hasNext();) {
InstructionHandle handle = j.next();
InstructionHandle nextHandle = handle.getNext();
Instruction ins = handle.getInstruction();
if (ins instanceof GETSTATIC && potentialInitialization(nextHandle)) {
XField field2 = XFactory.createXField((FieldInstruction) ins, methodGen.getConstantPool());
if (xfield.equals(field2)) {
sawGetStaticAfterPutStatic = true;