public static void printQueryIteratorSolutionOrnately(QueryIterator self, QuerySolution solution, int solutionnumber, PrintableStringWriter stream) {
    if (solutionnumber == Stella.NULL_INTEGER) {
      solutionnumber = 0;
      { QuerySolution solution000 = null;
        DictionaryIterator iter000 = ((DictionaryIterator)(self.solutions.allocateIterator()));

        while (iter000.nextP()) {
          solution000 = ((QuerySolution)(iter000.value));
          if (!Stella_Object.equalP(solution000.bindings, solution000)) {
            solutionnumber = solutionnumber + 1;
          }
        }
      }
    }
    { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

      try {
        Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
        stream.print("  #" + solutionnumber + ": ");
        { Stella_Object value = null;
          Vector vector000 = solution.bindings;
          int index000 = 0;
          int length000 = vector000.length();
          PatternVariable variable = null;
          Vector vector001 = self.externalVariables;
          int index001 = 0;
          int length001 = vector001.length();
          int vi = Stella.NULL_INTEGER;
          int iter001 = 0;

          for (;(index000 < length000) &&
                    (index001 < length001); 
                index000 = index000 + 1,
                index001 = index001 + 1,
                iter001 = iter001 + 1) {
            value = (vector000.theArray)[index000];
            variable = ((PatternVariable)((vector001.theArray)[index001]));
            vi = iter001;
            stream.print((((vi == 0) ? "" : ", ")) + variable.skolemName + "=" + value);
          }
        }
        if ((self.partialMatchStrategy != null) &&
            (solution.matchScore != Stella.NULL_FLOAT)) {
          stream.print(" " + solution.matchScore);
        }

      } finally {
        Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
      }
    }
  }