* @param start
   * @param end
   * @param target
   * @param targetIndex
   * @param caseConversion
   * @return int
   */
  public static int insertString(String source, int start, int end, StringBuffer target, int targetIndex, Keyword caseConversion) {
    if (end == Stella.NULL_INTEGER) {
      end = source.length() - 1;
    }
    if (end < start) {
      return (targetIndex);
    }
    if (caseConversion == Stella.KWD_UPCASE) {
      { int j = Stella.NULL_INTEGER;
        int iter000 = start;
        int upperBound000 = end;
        boolean unboundedP000 = upperBound000 == Stella.NULL_INTEGER;

        for (;unboundedP000 ||
                  (iter000 <= upperBound000); iter000 = iter000 + 1) {
          j = iter000;
          edu.isi.stella.javalib.Native.mutableString_nthSetter(target, (Stella.$CHARACTER_UPCASE_TABLE$.charAt(((int) (source.charAt(j))))), targetIndex);
          targetIndex = targetIndex + 1;
        }
      }
    }
    else if (caseConversion == Stella.KWD_DOWNCASE) {
      { int j = Stella.NULL_INTEGER;
        int iter001 = start;
        int upperBound001 = end;
        boolean unboundedP001 = upperBound001 == Stella.NULL_INTEGER;

        for (;unboundedP001 ||
                  (iter001 <= upperBound001); iter001 = iter001 + 1) {
          j = iter001;
          edu.isi.stella.javalib.Native.mutableString_nthSetter(target, (Stella.$CHARACTER_DOWNCASE_TABLE$.charAt(((int) (source.charAt(j))))), targetIndex);
          targetIndex = targetIndex + 1;
        }
      }
    }
    else if (caseConversion == Stella.KWD_CAPITALIZE) {
      edu.isi.stella.javalib.Native.mutableString_nthSetter(target, (Stella.$CHARACTER_UPCASE_TABLE$.charAt(((int) (source.charAt(start))))), targetIndex);
      targetIndex = targetIndex + 1;
      { int j = Stella.NULL_INTEGER;
        int iter002 = start + 1;
        int upperBound002 = end;
        boolean unboundedP002 = upperBound002 == Stella.NULL_INTEGER;

        for (;unboundedP002 ||
                  (iter002 <= upperBound002); iter002 = iter002 + 1) {
          j = iter002;
          edu.isi.stella.javalib.Native.mutableString_nthSetter(target, (Stella.$CHARACTER_DOWNCASE_TABLE$.charAt(((int) (source.charAt(j))))), targetIndex);
          targetIndex = targetIndex + 1;
        }
      }
    }
    else if (caseConversion == Stella.KWD_PRESERVE) {
      { int j = Stella.NULL_INTEGER;
        int iter003 = start;
        int upperBound003 = end;
        boolean unboundedP003 = upperBound003 == Stella.NULL_INTEGER;

        for (;unboundedP003 ||
                  (iter003 <= upperBound003); iter003 = iter003 + 1) {
          j = iter003;
          edu.isi.stella.javalib.Native.mutableString_nthSetter(target, (source.charAt(j)), targetIndex);
          targetIndex = targetIndex + 1;
        }
      }
    }
    else {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + caseConversion + "' is not a valid case option");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    return (targetIndex);
  }