void (InstructionSequence instrseq, Map<Integer, BasicBlock> instrBlocks) { exceptions = new ArrayList<>(); Map<String, ExceptionRangeCFG> mapRanges = new HashMap<>(); for (ExceptionHandler handler : instrseq.getExceptionTable().getHandlers()) { BasicBlock from = instrBlocks.get(handler.from_instr); BasicBlock to = instrBlocks.get(handler.to_instr); BasicBlock handle = instrBlocks.get(handler.handler_instr); String key = from.id + ":" + to.id + ":" + handle.id; if (mapRanges.containsKey(key)) { ExceptionRangeCFG range = mapRanges.get(key); range.addExceptionType(handler.exceptionClass); } else { List<BasicBlock> protectedRange = new ArrayList<>(); for (int j = from.id; j < to.id; j++) { BasicBlock block = blocks.getWithKey(j); protectedRange.add(block); block.addSuccessorException(handle); } ExceptionRangeCFG range = new ExceptionRangeCFG(protectedRange, handle, handler.exceptionClass == null ? null : Collections.singletonList(handler.exceptionClass)); mapRanges.put(key, range); exceptions.add(range); } } }