public static List searchLogicObjects(String modulename, List objects, Cons matchlist, String casesensitiveP) {
    { List result = List.newList();

      { LogicObject renamed_Object = null;
        Cons iter000 = objects.theConsList;
        Cons collect000 = null;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          renamed_Object = ((LogicObject)(iter000.value));
          if (GuiServer.searchStringMatchP(GuiServer.getLogicObjectName(renamed_Object, casesensitiveP), matchlist)) {
            if (collect000 == null) {
              {
                collect000 = Cons.cons(GuiServer.makeSearchResultItem(modulename, renamed_Object), Stella.NIL);
                if (result.theConsList == Stella.NIL) {
                  result.theConsList = collect000;
                }
                else {
                  Cons.addConsToEndOfConsList(result.theConsList, collect000);
                }
              }
            }
            else {
              {
                collect000.rest = Cons.cons(GuiServer.makeSearchResultItem(modulename, renamed_Object), Stella.NIL);
                collect000 = collect000.rest;
              }
            }
          }
        }
      }
      return (result);
    }
  }