<commit_before>package org.royaldev.royalcommands;

import org.apache.commons.lang.ArrayUtils;
import org.bukkit.Material;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ItemNameManager {

    // <Aliases, <ID, Data>>
    private final Map<String[], Map<Integer, Integer>> items = new HashMap<String[], Map<Integer, Integer>>();
    private final List<Integer> ids = new ArrayList<Integer>();

    public ItemNameManager(Iterable<String[]> values) {
        for (String[] s : values) {
            if (s.length < 1) continue;
            int id;
            int data;
            String[] aliases = s[2].split(",");
            try {
                id = Integer.valueOf(s[0]);
            } catch (NumberFormatException e) {
                RoyalCommands.instance.getLogger().warning("ID in IDs file is invalid: " + s[0]);
                id = -1;
            }
            try {
                data = Integer.valueOf(s[1]);
            } catch (NumberFormatException e) {
                RoyalCommands.instance.getLogger().warning("Data in IDs file is invalid: " + s[1]);
                data = -1;
            }
            Map<Integer, Integer> stuff = new HashMap<Integer, Integer>();
            stuff.put(id, data);
            ids.add(id);
            synchronized (items) {
                items.put(aliases, stuff);
            }
        }
    }

    public boolean aliasExists(int i) {
        return ids.contains(i);
    }

    public boolean aliasExists(Material m) {
        return ids.contains(m.getId());
    }

    public String getIDFromAlias(String alias) {
        boolean found = false;
        String[] aliases = null;
        String data = null;
        if (alias.contains(":")) {
            String[] datas = alias.split(":");
            data = (datas.length > 1) ? datas[1] : "";
            alias = datas[0];
        }
        for (String[] s : items.keySet())
            if (ArrayUtils.contains(s, alias.toLowerCase())) {
                found = true;
                aliases = s;
                break;
            }
        if (!found) return null;
        Map.Entry<Integer, Integer> entry = items.get(aliases).entrySet().iterator().next();
        if (data == null || data.isEmpty()) data = String.valueOf(entry.getValue());
        return entry.getKey() + ":" + data;
    }

}
<commit_msg>Fixed: Empty line issue for real<commit_after>package org.royaldev.royalcommands;

import org.apache.commons.lang.ArrayUtils;
import org.bukkit.Material;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

public class ItemNameManager {

    // <Aliases, <ID, Data>>
    private final Map<String[], Map<Integer, Integer>> items = new HashMap<String[], Map<Integer, Integer>>();
    private final List<Integer> ids = new ArrayList<Integer>();

    public ItemNameManager(Iterable<String[]> values) {
        for (String[] s : values) {
            if (s.length < 1) continue;
            int id;
            int data;
            String[] aliases;
            try {
                aliases = s[2].split(",");
            } catch (IndexOutOfBoundsException e) {
                Logger.getLogger("Minecraft").warning("[RoyalCommands] Values passed in ItemNameManager invalid: " + ArrayUtils.toString(values));
                continue;
            }
            try {
                id = Integer.valueOf(s[0]);
            } catch (NumberFormatException e) {
                RoyalCommands.instance.getLogger().warning("ID in IDs file is invalid: " + s[0]);
                id = -1;
            }
            try {
                data = Integer.valueOf(s[1]);
            } catch (NumberFormatException e) {
                RoyalCommands.instance.getLogger().warning("Data in IDs file is invalid: " + s[1]);
                data = -1;
            }
            Map<Integer, Integer> stuff = new HashMap<Integer, Integer>();
            stuff.put(id, data);
            ids.add(id);
            synchronized (items) {
                items.put(aliases, stuff);
            }
        }
    }

    public boolean aliasExists(int i) {
        return ids.contains(i);
    }

    public boolean aliasExists(Material m) {
        return ids.contains(m.getId());
    }

    public String getIDFromAlias(String alias) {
        boolean found = false;
        String[] aliases = null;
        String data = null;
        if (alias.contains(":")) {
            String[] datas = alias.split(":");
            data = (datas.length > 1) ? datas[1] : "";
            alias = datas[0];
        }
        for (String[] s : items.keySet())
            if (ArrayUtils.contains(s, alias.toLowerCase())) {
                found = true;
                aliases = s;
                break;
            }
        if (!found) return null;
        Map.Entry<Integer, Integer> entry = items.get(aliases).entrySet().iterator().next();
        if (data == null || data.isEmpty()) data = String.valueOf(entry.getValue());
        return entry.getKey() + ":" + data;
    }

}

{'fraction_non_alphanumeric': 0.13311180609851447, 'fraction_numerical': 0.004300234558248631, 'mean_word_length': 1.8506963788300836, 'pattern_counts': {'":': 6, '<': 29, '<?xml version=': 0, '>': 29, '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': '4934322', 'n_tokens_mistral': 1431, 'n_tokens_neox': 1402, 'n_words': 344}