public static PLSurrogateCollection createSuperrelationsContainer(LogicObject relation, Module module) {
    { Object old$Module$000 = Stella.$MODULE$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setSpecial(Stella.$MODULE$, module);
        Native.setSpecial(Stella.$CONTEXT$, ((Module)(Stella.$MODULE$.get())));
        { edu.isi.powerloom.PlIterator parentrelationiter = edu.isi.powerloom.PLI.getDirectSuperrelations(relation, module, null);
          List surrogatechildren = List.newList();
          PLSurrogateCollection plsurrogatecollection = PLSurrogateCollection.new_PLSurrogateCollection();

          { LogicObject parent = null;
            edu.isi.powerloom.PlIterator iter000 = parentrelationiter;
            Cons collect000 = null;

            while (iter000.nextP()) {
              parent = ((LogicObject)(iter000.value));
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(GuiServer.makeLogicSurrogate(parent), Stella.NIL);
                  if (surrogatechildren.theConsList == Stella.NIL) {
                    surrogatechildren.theConsList = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(surrogatechildren.theConsList, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(GuiServer.makeLogicSurrogate(parent), Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
          surrogatechildren = surrogatechildren.sort(Native.find_java_method("edu.isi.powerloom.server.gui.PLSurrogate", "PLSurrogateL", new java.lang.Class [] {Native.find_java_class("edu.isi.powerloom.server.gui.PLSurrogate"), Native.find_java_class("edu.isi.powerloom.server.gui.PLSurrogate")}));
          plsurrogatecollection.PLSurrogate = surrogatechildren;
          return (plsurrogatecollection);
        }

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Stella.$MODULE$.set(old$Module$000);
      }
    }
  }