code: private void setChoices(BigInteger multiChoice, JSchema schema, JSVariant var) {
      for (int i = 0; i < var.getCaseCount(); i++) {
        BigInteger count = ((JSType)var.getCase(i)).getMultiChoiceCount();
        if (multiChoice.compareTo(count) >= 0)
          multiChoice = multiChoice.subtract(count);
        else {
          // We now have the case of our particular Variant in i.  We set that in
          // choiceCodes and then recursively visit the Variants dominated by ours.
          choiceCodes[var.getIndex()] = i;
          JSVariant[] subVars = var.getDominatedVariants(i);
          setChoices(multiChoice, count, schema, subVars);
          return;
        }
      }
      // We should never get here
      throw new RuntimeException("Bad multiChoice code");
    }
docs: Set the choices implied by the multiChoice code or contribution to a single JSVariant