private static List<MUCRoomSearchInfo> sortByUserAmount(List<MUCRoomSearchInfo> mucs)
    {
        mucs.sort((o1, o2) -> o2.getOccupantsCount() - o1.getOccupantsCount());

        return mucs;
    }
Sorts the provided list in such a way that the MUC with the most users
will be the first one in the list.

@param mucs
           The unordered list that will be sorted.
@return The sorted list of MUC rooms.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQMUCSearchHandler.java