@Override
    public synchronized Set<Group> getGroupsFromKeys() {
        Set<Group> result = new HashSet<>();
        for(String groupName : getKnownGroupNamesFromKeys()) {
            Group resolved = Group.resolveFrom(groupName);
            if(resolved != null)
                result.add(resolved);
        }
        return result;
    }
Returns the groups that are implied (resolvable) from the keys in the map.

@return A Set containing the groups among the keys
xmppserver/src/main/java/org/jivesoftware/openfire/group/ConcurrentGroupMap.java