// See if the store that saves the exception object
// is alive or dead. We rely on the fact that javac
// always (?) emits an ASTORE instruction to save
// the caught exception.
LiveLocalStoreDataflow dataflow = getClassContext().getLiveLocalStoreDataflow(getMethod());
CFG cfg = getClassContext().getCFG(getMethod());
Collection<BasicBlock> blockList = cfg.getBlocksContainingInstructionWithOffset(obj.getHandlerPC());
for (BasicBlock block : blockList) {
InstructionHandle first = block.getFirstInstruction();
if (first != null && first.getPosition() == obj.getHandlerPC() && first.getInstruction() instanceof ASTORE) {
ASTORE astore = (ASTORE) first.getInstruction();
BitSet liveStoreSet = dataflow.getFactAtLocation(new Location(first, block));
if (!liveStoreSet.get(astore.getIndex())) {
// The ASTORE storing the exception object is dead
if (DEBUG) {
System.out.println("Dead exception store at " + first);
}