public static String fixupDocumentationStringQuoting(String documentation) {
    if (documentation == null) {
      return (null);
    }
    { int closingquoteposition = Stella.NULL_INTEGER;
      char precedingcharacter = Stella.NULL_CHARACTER;
      String openparentheses = "([{";
      StringBuffer buffer = new StringBuffer(documentation);

      { char renamed_Char = Stella.NULL_CHARACTER;
        String vector000 = documentation;
        int index000 = 0;
        int length000 = vector000.length();
        int i = Stella.NULL_INTEGER;
        int iter000 = 0;

        loop000 : for (;index000 < length000; index000 = index000 + 1, iter000 = iter000 + 1) {
          renamed_Char = vector000.charAt(index000);
          i = iter000;
          switch (renamed_Char) {
            case '`': 
            case '\'': 
              if (i == closingquoteposition) {
                continue loop000;
              }
              if (i == 0) {
                precedingcharacter = ' ';
              }
              else {
                precedingcharacter = documentation.charAt((i - 1));
              }
              if ((Stella.$CHARACTER_TYPE_TABLE$[(int) precedingcharacter] == Stella.KWD_WHITE_SPACE) ||
                  Native.string_memberP(openparentheses, precedingcharacter)) {
                closingquoteposition = Native.string_position(documentation, '\'', i + 1);
                if (closingquoteposition != Stella.NULL_INTEGER) {
                  edu.isi.stella.javalib.Native.mutableString_nthSetter(buffer, '`', i);
                }
              }
            break;
            default:
            break;
          }
        }
      }
      return (buffer.toString());
    }