<commit_before>package com.vdurmont.emoji;

import java.io.UnsupportedEncodingException;
import java.util.Collections;
import java.util.List;


/**
 * This class represents an emoji.<br>
 * <br>
 * This object is immutable so it can be used safely in a multithreaded context.
 *
 * @author <NAME> [<EMAIL>]
 */
public class Emoji {
    private final String description;
    private final boolean supportsFitzpatrick;
    private final List<String> aliases;
    private final List<String> tags;
    private final String unicode;
    private final String htmlDec;
    private final String htmlHex;

    /**
     * Constructor for the Emoji.
     *
     * @param description         The description of the emoji
     * @param supportsFitzpatrick wether the emoji supports the Fitzpatrick modifiers or not
     * @param aliases             the aliases for this emoji
     * @param tags                the tags associated with this emoji
     * @param bytes               the bytes that represent the emoji
     */
    protected Emoji(String description, boolean supportsFitzpatrick, List<String> aliases, List<String> tags, byte... bytes) {
        this.description = description;
        this.supportsFitzpatrick = supportsFitzpatrick;
        this.aliases = Collections.unmodifiableList(aliases);
        this.tags = Collections.unmodifiableList(tags);
        try {
            this.unicode = new String(bytes, "UTF-8");
            int htmlCode = Character.codePointAt(this.unicode, 0);
            this.htmlDec = "&#" + htmlCode + ";";
            this.htmlHex = "&#x" + Integer.toHexString(htmlCode) + ";";
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * Returns the description of the emoji
     *
     * @return the description
     */
    public String getDescription() {<commit_msg>Fixed incorrect html codes<commit_after>package com.vdurmont.emoji;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;


/**
 * This class represents an emoji.<br>
 * <br>
 * This object is immutable so it can be used safely in a multithreaded context.
 *
 * @author <NAME> [<EMAIL>]
 */
public class Emoji {
    private final String description;
    private final boolean supportsFitzpatrick;
    private final List<String> aliases;
    private final List<String> tags;
    private final String unicode;
    private final String htmlDec;
    private final String htmlHex;

    /**
     * Constructor for the Emoji.
     *
     * @param description         The description of the emoji
     * @param supportsFitzpatrick wether the emoji supports the Fitzpatrick modifiers or not
     * @param aliases             the aliases for this emoji
     * @param tags                the tags associated with this emoji
     * @param bytes               the bytes that represent the emoji
     */
    protected Emoji(String description, boolean supportsFitzpatrick, List<String> aliases, List<String> tags, byte... bytes) {
        this.description = description;
        this.supportsFitzpatrick = supportsFitzpatrick;
        this.aliases = Collections.unmodifiableList(aliases);
        this.tags = Collections.unmodifiableList(tags);

        int count = 0;
        try {
            this.unicode = new String(bytes, "UTF-8");
            int stringLength = getUnicode().length();
            String[] pointCodes = new String[stringLength];
            String[] pointCodesHex = new String[stringLength];

            for (int offset = 0; offset < stringLength; ) {
                final int codePoint = getUnicode().codePointAt(offset);

                pointCodes[count] = String.format("&#%d;", codePoint);
                pointCodesHex[count++] = String.format("&#x%x;", codePoint);

                offset += Character.charCount(codePoint);
            }
            this.htmlDec = String.join("", Arrays.copyOfRange(pointCodes, 0, count));
            this.htmlHex = String.join("", Arrays.copyOfRange(pointCodesHex, 0, count));
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * Returns the description of the emoji
     *
     * @return the description
     */
    public String getDescription() {
{'fraction_non_alphanumeric': 0.09253246753246754, 'fraction_numerical': 0.0016233766233766235, 'mean_word_length': 2.5585808580858087, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5516064', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1157, 'n_words': 354}