@Nonnull
    public List<String> getSharedWithUsersInGroupNames() {
        final List<String> result = new ArrayList<>();
        if (getSharedWith() != SharedGroupVisibility.usersOfGroups) {
            return result;
        }

        final String value = properties.get(SHARED_ROSTER_GROUP_LIST_PROPERTY_KEY);
        if (value == null) {
            // When in this getSharedWith, I don't think that the value can be null. I'm not confident enough to add this as an 'assert' though.
            Log.warn("Unable to get shared-with-users-in-group-names for group, as property '{}' unexpectedly has a null value for group: {}", SHARED_ROSTER_GROUP_LIST_PROPERTY_KEY, this);
            return result;
        }

        // Value is a comma-seperated list of group-names
        for (final String groupName : value.split(",")) {
            if (!groupName.trim().isEmpty()) {
                result.add(groupName.trim());
            }
        }
        // A group is always shared with itself when it's shared with other groups.
        if (!result.contains(this.name)) {
            result.add(this.name);
        }
        return result;
    }
Defines the groups of users with which this group is shared if contact list group sharing is enabled and this
group is shared with (other) groups (as defined by {@link #getSharedWith()}).

@return A collection of group names, possibly empty.
xmppserver/src/main/java/org/jivesoftware/openfire/group/Group.java