private static void removeJsrInstructions(ConstantPool pool, BasicBlock block, DataPoint data) {

    ListStack<VarType> stack = data.getStack();

    InstructionSequence seq = block.getSeq();
    for (int i = 0; i < seq.length(); i++) {
      Instruction instr = seq.getInstr(i);

      VarType var = null;
      if (instr.opcode == CodeConstants.opc_astore || instr.opcode == CodeConstants.opc_pop) {
        var = stack.getByOffset(-1);
      }

      InstructionImpact.stepTypes(data, instr, pool);

      switch (instr.opcode) {
        case CodeConstants.opc_jsr:
        case CodeConstants.opc_ret:
          seq.removeInstruction(i);
          i--;
          break;
        case CodeConstants.opc_astore:
        case CodeConstants.opc_pop:
          if (var.type == CodeType.ADDRESS) {
            seq.removeInstruction(i);
            i--;
          }
      }
    }

    block.mark = 1;

    for (int i = 0; i < block.getSuccs().size(); i++) {
      BasicBlock suc = block.getSuccs().get(i);
      if (suc.mark != 1) {
        removeJsrInstructions(pool, suc, data.copy());
      }
    }

    for (int i = 0; i < block.getSuccExceptions().size(); i++) {
      BasicBlock suc = block.getSuccExceptions().get(i);
      if (suc.mark != 1) {

        DataPoint point = new DataPoint();
        point.setLocalVariables(new ArrayList<>(data.getLocalVariables()));
        point.getStack().push(new VarType(CodeType.OBJECT, 0, null));

        removeJsrInstructions(pool, suc, point);
      }
    }
  }
@param mapInstrBlocks mapping of instruction -> block
src/org/jetbrains/java/decompiler/code/cfg/ControlFlowGraph.java