public static String getJustificationString(Justification justification) {
    { Object old$ExplanationFormat$000 = Logic.$EXPLANATION_FORMAT$.get();
      Object old$ExplanationAudience$000 = Logic.$EXPLANATION_AUDIENCE$.get();
      Object old$LogicDialect$000 = Logic.$LOGIC_DIALECT$.get();
      Object old$MostRecentExplanationMapping$000 = Logic.$MOST_RECENT_EXPLANATION_MAPPING$.get();

      try {
        Native.setSpecial(Logic.$EXPLANATION_FORMAT$, GuiServer.KWD_HTML);
        Native.setSpecial(Logic.$EXPLANATION_AUDIENCE$, GuiServer.KWD_LAY);
        Native.setSpecial(Logic.$LOGIC_DIALECT$, GuiServer.KWD_JAVA_GUI_HTML);
        Native.setSpecial(Logic.$MOST_RECENT_EXPLANATION_MAPPING$, KeyValueList.newKeyValueList());
        { OutputStringStream stringstream = OutputStringStream.newOutputStringStream();
          ExplanationInfo info = Justification.registerJustification(Justification.visibleJustification(justification), ((KeyValueList)(Logic.$MOST_RECENT_EXPLANATION_MAPPING$.get())));

          info.label = "1";
          info.depth = 1;
          {
            stringstream.nativeStream.println();
            stringstream.nativeStream.print("Explanation #1");
          }
;
          if (justification.positiveScore != Stella.NULL_FLOAT) {
            stringstream.nativeStream.print(" score=" + justification.positiveScore);
          }
          {
            stringstream.nativeStream.println(":");
            stringstream.nativeStream.println();
          }
;
          Justification.printWhynotJustification(Justification.visibleJustification(justification), stringstream, Stella.NULL_INTEGER, GuiServer.KWD_BRIEF, false);
          { String result = stringstream.theStringReader();

            if (GuiServer.$PLGUI_EXPLANATION_TRACE_FILE$ != null) {
              { OutputFileStream out = null;

                try {
                  out = Stella.openOutputFile(GuiServer.$PLGUI_EXPLANATION_TRACE_FILE$, Stella.NIL);
                  out.nativeStream.println(result);

                } finally {
                  if (out != null) {
                    out.free();
                  }
                }
              }
            }
            return (result);
          }
        }

      } finally {
        Logic.$MOST_RECENT_EXPLANATION_MAPPING$.set(old$MostRecentExplanationMapping$000);
        Logic.$LOGIC_DIALECT$.set(old$LogicDialect$000);
        Logic.$EXPLANATION_AUDIENCE$.set(old$ExplanationAudience$000);
        Logic.$EXPLANATION_FORMAT$.set(old$ExplanationFormat$000);
      }
    }
  }