<commit_before>/*
 * Copyright @ 2017 Atlassian Pty Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jitsi.videobridge;

import org.json.simple.*;

import java.util.*;

public class EndpointMessageBuilder
{
    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code ClientHello} message.
     */
    public static final String COLIBRI_CLASS_CLIENT_HELLO
        = "ClientHello";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a dominant speaker
     * change event.
     */
    public static final String COLIBRI_CLASS_DOMINANT_SPEAKER_CHANGE
        = "DominantSpeakerEndpointChangeEvent";

    /**
     * Constant value defines the name of "colibriClass" for connectivity status
     * notifications sent over the data channels.
     */
    public static final String COLIBRI_CLASS_ENDPOINT_CONNECTIVITY_STATUS
        = "EndpointConnectivityStatusChangeEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code EndpointMessage}.
     */
    public static final String COLIBRI_CLASS_ENDPOINT_MESSAGE
        = "EndpointMessage";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code LastNChangedEvent}.
     */
    public static final String COLIBRI_CLASS_LASTN_CHANGED
        = "LastNChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code LastNEndpointsChangedEvent}.
     */
    public static final String COLIBRI_CLASS_LASTN_ENDPOINTS_CHANGED
        = "LastNEndpointsChangeEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code PinnedEndpointChangedEvent}.
     */
    @Deprecated
    public static final String COLIBRI_CLASS_PINNED_ENDPOINT_CHANGED
        = "PinnedEndpointChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code PinnedEndpointsChangedEvent}.
     */
    @Deprecated
    public static final String COLIBRI_CLASS_PINNED_ENDPOINTS_CHANGED
        = "PinnedEndpointsChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code ReceiverVideoConstraint} message.
     *
     * Note that this message is substantially different from its successor
     * (ReceiverVideoConstraintsChangedEvent) and should not be confused with
     * that.
     *
     * Example Json message:
     *
     * {
     *     colibriClass: ReceiverVideoConstraint,
     *     maxFrameHeight: MAX_FRAME_HEIGHT
     *
     * }
     */
    @Deprecated
    public static final String COLIBRI_CLASS_RECEIVER_VIDEO_CONSTRAINT
        = "ReceiverVideoConstraint";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code ReceiverVideoConstraintsChanged} message.
     *
     * NOTE that the intention is for {@code ReceiverVideoConstraintsChanged}
     * message to completely replace the four messages below:
     *
     * {@code ReceiverVideoConstraint},
     * {@code PinnedEndpointChangedEvent},
     * {@code PinnedEndpointsChangedEvent},
     * {@code SelectedEndpointChangedEvent} and
     * {@code SelectedEndpointsChangedEvent}
     *
     * This isn't the case currently because that would require
     * substantial changes in the client and instead it was decided to provide a
     * server side compatibility layer {@link VideoConstraintsCompatibility}.
     *
     * Usage of the above old-world data messages should be avoided in future
     * code.
     *
     * Example Json message:
     *
     * {
     *     colibriClass: ReceiverVideoConstraintsChangedEvent,
     *     videoConstraints: [{
     *         id: ENDPOINT_ID,
     *         idealHeight: IDEAL_FRAME_HEIGHT
     *     }]
     *
     * }
     */
    public static final String COLIBRI_CLASS_RECEIVER_VIDEO_CONSTRAINTS_CHANGED
        = "ReceiverVideoConstraintsChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code SenderVideoConstraintsChanged} message.
     */
    public static final String COLIBRI_CLASS_SENDER_VIDEO_CONSTRAINTS_CHANGED
        = "SenderVideoConstraintsChangedEvent";
<commit_msg>ref: Make a message name shorter as per @bgrozev's suggestion<commit_after>/*
 * Copyright @ 2017 Atlassian Pty Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jitsi.videobridge;

import org.json.simple.*;

import java.util.*;

public class EndpointMessageBuilder
{
    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code ClientHello} message.
     */
    public static final String COLIBRI_CLASS_CLIENT_HELLO
        = "ClientHello";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a dominant speaker
     * change event.
     */
    public static final String COLIBRI_CLASS_DOMINANT_SPEAKER_CHANGE
        = "DominantSpeakerEndpointChangeEvent";

    /**
     * Constant value defines the name of "colibriClass" for connectivity status
     * notifications sent over the data channels.
     */
    public static final String COLIBRI_CLASS_ENDPOINT_CONNECTIVITY_STATUS
        = "EndpointConnectivityStatusChangeEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code EndpointMessage}.
     */
    public static final String COLIBRI_CLASS_ENDPOINT_MESSAGE
        = "EndpointMessage";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code LastNChangedEvent}.
     */
    public static final String COLIBRI_CLASS_LASTN_CHANGED
        = "LastNChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code LastNEndpointsChangedEvent}.
     */
    public static final String COLIBRI_CLASS_LASTN_ENDPOINTS_CHANGED
        = "LastNEndpointsChangeEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code PinnedEndpointChangedEvent}.
     */
    @Deprecated
    public static final String COLIBRI_CLASS_PINNED_ENDPOINT_CHANGED
        = "PinnedEndpointChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code PinnedEndpointsChangedEvent}.
     */
    @Deprecated
    public static final String COLIBRI_CLASS_PINNED_ENDPOINTS_CHANGED
        = "PinnedEndpointsChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code ReceiverVideoConstraint} message.
     *
     * Note that this message is substantially different from its successor
     * (ReceiverVideoConstraintsChangedEvent) and should not be confused with
     * that.
     *
     * Example Json message:
     *
     * {
     *     colibriClass: ReceiverVideoConstraint,
     *     maxFrameHeight: MAX_FRAME_HEIGHT
     *
     * }
     */
    @Deprecated
    public static final String COLIBRI_CLASS_RECEIVER_VIDEO_CONSTRAINT
        = "ReceiverVideoConstraint";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code ReceiverVideoConstraintsChanged} message.
     *
     * NOTE that the intention is for {@code ReceiverVideoConstraintsChanged}
     * message to completely replace the four messages below:
     *
     * {@code ReceiverVideoConstraint},
     * {@code PinnedEndpointChangedEvent},
     * {@code PinnedEndpointsChangedEvent},
     * {@code SelectedEndpointChangedEvent} and
     * {@code SelectedEndpointsChangedEvent}
     *
     * This isn't the case currently because that would require
     * substantial changes in the client and instead it was decided to provide a
     * server side compatibility layer {@link VideoConstraintsCompatibility}.
     *
     * Usage of the above old-world data messages should be avoided in future
     * code.
     *
     * Example Json message:
     *
     * {
     *     colibriClass: ReceiverVideoConstraintsChangedEvent,
     *     videoConstraints: [{
     *         id: ENDPOINT_ID,
     *         idealHeight: IDEAL_FRAME_HEIGHT
     *     }]
     *
     * }
     */
    public static final String COLIBRI_CLASS_RECEIVER_VIDEO_CONSTRAINTS_CHANGED
        = "ReceiverVideoConstraintsChangedEvent";

    /**
     * The {@link Videobridge#COLIBRI_CLASS} value indicating a
     * {@code SenderVideoConstraintsChanged} message.
     */
    public static final String COLIBRI_CLASS_SENDER_VIDEO_CONSTRAINTS_CHANGED
        = "SenderVideoConstraints";

{'fraction_non_alphanumeric': 0.07535706672351311, 'fraction_numerical': 0.0017053933063312726, 'mean_word_length': 3.0409130060292853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1462470', 'n_tokens_mistral': 2628, 'n_tokens_neox': 2580, 'n_words': 743}