code: static int getRunFromLogicalIndex(Bidi bidi, int logicalIndex) {
          BidiRun[] runs = bidi.runs;
          int runCount = bidi.runCount, visualStart = 0, i, length, logicalStart;
  
          for (i = 0; i < runCount; i++) {
              length = runs[i].limit - visualStart;
              logicalStart = runs[i].start;
              if ((logicalIndex >= logicalStart) && (logicalIndex < (logicalStart+length))) {
                  return i;
              }
              visualStart += length;
          }
          ///CLOVER:OFF
          /* we should never get here */
          throw new IllegalStateException("Internal ICU error in getRunFromLogicalIndex");
          ///CLOVER:ON
      }
docs: /* compute the runs array ---------------------------------------------------