<commit_before>package io.github.xxyy.common.games.data;

import io.github.xxyy.common.games.GameLib;
import io.github.xxyy.common.sql.QueryResult;
import io.github.xxyy.common.sql.SafeSql;
import org.bukkit.ChatColor;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;

/**
 * Provides data of groups.
 *
 * @author xxyy98
 */
public class GroupData {

    /**
     * Provides the full table name that is used for storing permissions. Constant, default value is {@value GameLib#XY_DB_NAME}.game_permissions.
     */
    public static final String FULL_XY_PERM_TABLE = GameLib.CENTRAL_DB_NAME + ".group_permissions";
    /**
     * Provides the full table name that is used for storing group meta. Constant, default value is {@value GameLib#XY_DB_NAME}.game_permissions.
     */
    public static final String FULL_XY_META_TABLE = GameLib.CENTRAL_DB_NAME + ".groups";
    private static Map<String, GroupData> cache = new ConcurrentHashMap<>(7, 0.75F, 2);
    private String name;
    private List<String> rawPermissions = null;
    private Map<String, Boolean> matchedPermissions = new ConcurrentHashMap<>(16, 0.75F, 2);
    private final SafeSql ssql;
    private String nameColor = "§9";
    private String chatColor = "§7";
    private boolean metaFetched = false;

    /**
     * Constructs a {@link GroupData} by its name.
     *
     * @param name Name of the group that this {@link GroupData} object represents.
     */
    protected GroupData(String name, SafeSql ssql) {
        this.name = name;
        this.ssql = ssql;
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof GroupData && this.name.equalsIgnoreCase(((GroupData) obj).getName());
    }

    /**
     * @return The chat color of the group represented by this {@link GroupData} object.
     */<commit_msg>Fix wrong table name in GroupData<commit_after>package io.github.xxyy.common.games.data;

import io.github.xxyy.common.games.GameLib;
import io.github.xxyy.common.sql.QueryResult;
import io.github.xxyy.common.sql.SafeSql;
import org.bukkit.ChatColor;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;

/**
 * Provides data of groups.
 *
 * @author xxyy98
 */
public class GroupData {

    /**
     * Provides the full table name that is used for storing permissions. Constant, default value is {@value GameLib#XY_DB_NAME}.game_permissions.
     */
    public static final String FULL_XY_PERM_TABLE = GameLib.CENTRAL_DB_NAME + ".groups_permissions";
    /**
     * Provides the full table name that is used for storing group meta. Constant, default value is {@value GameLib#XY_DB_NAME}.game_permissions.
     */
    public static final String FULL_XY_META_TABLE = GameLib.CENTRAL_DB_NAME + ".groups";
    private static Map<String, GroupData> cache = new ConcurrentHashMap<>(7, 0.75F, 2);
    private String name;
    private List<String> rawPermissions = null;
    private Map<String, Boolean> matchedPermissions = new ConcurrentHashMap<>(16, 0.75F, 2);
    private final SafeSql ssql;
    private String nameColor = "§9";
    private String chatColor = "§7";
    private boolean metaFetched = false;

    /**
     * Constructs a {@link GroupData} by its name.
     *
     * @param name Name of the group that this {@link GroupData} object represents.
     */
    protected GroupData(String name, SafeSql ssql) {
        this.name = name;
        this.ssql = ssql;
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof GroupData && this.name.equalsIgnoreCase(((GroupData) obj).getName());
    }

    /**
     * @return The chat color of the group represented by this {@link GroupData} object.
     */
{'fraction_non_alphanumeric': 0.10354360392058307, 'fraction_numerical': 0.007539582809751194, 'mean_word_length': 3.492099322799097, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '256972', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1200, 'n_words': 353}