private static short[] findStartInstructions(InstructionSequence seq) {
    int len = seq.length();
    short[] inststates = new short[len];

    // exception blocks
    for (ExceptionHandler handler : seq.getExceptionTable().getHandlers()) {
      inststates[handler.from_instr] = 1;
      inststates[handler.handler_instr] = 1;

      if (handler.to_instr < len) {
        inststates[handler.to_instr] = 1;
      }
    }


    for (int i = 0; i < len; i++) {
      Instruction instr = seq.getInstr(i);
      switch (instr.group) {
        case GROUP_JUMP:
          inststates[((JumpInstruction)instr).destination] = 1;
          // fallthrough
        case GROUP_RETURN:
          if (i + 1 < len) {
            inststates[i + 1] = 1;
          }
          break;
        case GROUP_SWITCH:
          SwitchInstruction swinstr = (SwitchInstruction)instr;
          int[] dests = swinstr.getDestinations();
          for (int j = dests.length - 1; j >= 0; j--) {
            inststates[dests[j]] = 1;
          }
          inststates[swinstr.getDefaultDestination()] = 1;
          if (i + 1 < len) {
            inststates[i + 1] = 1;
          }
          break;
      }
    }

    // first instruction
    inststates[0] = 1;

    return inststates;
  }
creates essentially a bitmap marking which instructions are the start of a block.<br/>
starts are:
<ul>
  <li> begin of the method </li>
  <li> begin of an exception range </li>
  <li> begin of an exception handler </li>
  <li> first statement after an exception range </li>
  <li> jump targets </li>
  <li> switch branches & default </li>
  <li> instructions after a return, throw or after a jump</li>
</ul>
src/org/jetbrains/java/decompiler/code/cfg/ControlFlowGraph.java