public String getReservedNickname(@Nonnull final JID userAddress) {
        final JID bareJID = userAddress.asBareJID();
        String answer = members.get(bareJID);
        if (answer == null || answer.trim().isEmpty()) {
            return null;
        }
        return answer;
    }
Returns the reserved room nickname for the bare JID or null if none.

@param userAddress The (real) JID of the user of which you'd like to obtain his reserved nickname .
@return the reserved room nickname for the user, or null if none.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java