public static List searchModule(String modulename, String searchstring, String searchinstanceP, String searchconceptP, String searchrelationP, String casesensitiveP) {
    { List conceptresults = List.newList();
      List relationresults = List.newList();
      List instanceresults = List.newList();
      Cons matchlist = GuiServer.parseMatchString(searchstring, casesensitiveP);
      List result = List.newList();
      Module module = edu.isi.powerloom.PLI.getModule(modulename, null);

      { 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())));
          if (Stella.stringEqlP(searchinstanceP, "TRUE")) {
            instanceresults = GuiServer.searchInstances(modulename, matchlist, casesensitiveP);
          }
          if (Stella.stringEqlP(searchrelationP, "TRUE")) {
            relationresults = GuiServer.searchRelations(modulename, matchlist, casesensitiveP);
          }
          if (Stella.stringEqlP(searchconceptP, "TRUE")) {
            conceptresults = GuiServer.searchConcepts(modulename, matchlist, casesensitiveP);
          }
          result = conceptresults.concatenate(instanceresults, Cons.cons(relationresults, Stella.NIL));
          return (result);

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