public void removeBlock(BasicBlock block) {

    while (!block.getSuccessors().isEmpty()) {
      block.removeSuccessor(block.getSuccessors().get(0));
    }

    while (!block.getSuccessorExceptions().isEmpty()) {
      block.removeSuccessorException(block.getSuccessorExceptions().get(0));
    }

    while (!block.getPredecessors().isEmpty()) {
      block.getPredecessors().get(0).removeSuccessor(block);
    }

    while (!block.getPredecessorExceptions().isEmpty()) {
      block.getPredecessorExceptions().get(0).removeSuccessorException(block);
    }

    last.removePredecessor(block);

    blocks.removeWithKey(block.id);

    for (int i = exceptions.size() - 1; i >= 0; i--) {
      ExceptionRangeCFG range = exceptions.get(i);
      if (range.getHandler() == block) {
        exceptions.remove(i);
      }
      else {
        List<BasicBlock> lstRange = range.getProtectedRange();
        lstRange.remove(block);

        if (lstRange.isEmpty()) {
          exceptions.remove(i);
        }
      }
    }

    subroutines.entrySet().removeIf(ent -> ent.getKey() == block || ent.getValue() == block);
  }
public void removeBlock(BasicBlock block)