<commit_before>package com.techcavern.wavetact.utils;

import com.techcavern.wavetact.utils.objects.*;
import org.pircbotx.Channel;
import org.pircbotx.PircBotX;
import org.pircbotx.User;

/**
 * Created by jztech101 on 7/4/14.
 */
public class GetUtils {

    public static User getUserByNick(Channel channelObject, String nick) {
        for (User u : channelObject.getUsers()) {
            if (u.getNick().equalsIgnoreCase(nick)) {
                return u;
            }
        }
        return null;
    }


    public static Channel getChannelbyName(PircBotX botObject, String channelName) {
        for (Channel u : botObject.getUserBot().getChannels()) {
            if (u.getName().equalsIgnoreCase(channelName)) {
                return u;
            }
        }
        return null;
    }

    public static PircBotX getBotByNetwork(String network) {
        for (PircBotX c : GeneralRegistry.WaveTact.getBots()) {
            if (c.getServerInfo().getNetwork().equals(network)) {
                return c;
            }
        }
        return null;
    }

    public static GenericCommand getCommand(String Command) {
        for (GenericCommand g : GeneralRegistry.GenericCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.TrustedCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ControllerCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanOwnerCommands) {
            if (g.getCommand().equalsIgnoreCase(Command)) {
                return g;
            }
        }
        for (GenericCommand g : GeneralRegistry.GlobalCommands) {
            if (g.getCommand().equalsIgnoreCase(Command)) {
                return g;
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanOpCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanHalfOpCommands) {
            if (g.getCommand().equalsIgnoreCase(Command)) {
                return g;
            }
        }
        for (GenericCommand g : GeneralRegistry.AnonymonityCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanFounderCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        return null;

    }

    public static String getCommandChar(PircBotX botObject) {
        for (CommandChar d : GeneralRegistry.CommandChars) {
            if (d.getBot() == botObject) {
                return d.getCommandChar();<commit_msg>Fix Missing Aliases<commit_after>package com.techcavern.wavetact.utils;

import com.techcavern.wavetact.utils.objects.*;
import org.pircbotx.Channel;
import org.pircbotx.PircBotX;
import org.pircbotx.User;

/**
 * Created by jztech101 on 7/4/14.
 */
public class GetUtils {

    public static User getUserByNick(Channel channelObject, String nick) {
        for (User u : channelObject.getUsers()) {
            if (u.getNick().equalsIgnoreCase(nick)) {
                return u;
            }
        }
        return null;
    }


    public static Channel getChannelbyName(PircBotX botObject, String channelName) {
        for (Channel u : botObject.getUserBot().getChannels()) {
            if (u.getName().equalsIgnoreCase(channelName)) {
                return u;
            }
        }
        return null;
    }

    public static PircBotX getBotByNetwork(String network) {
        for (PircBotX c : GeneralRegistry.WaveTact.getBots()) {
            if (c.getServerInfo().getNetwork().equals(network)) {
                return c;
            }
        }
        return null;
    }

    public static GenericCommand getCommand(String Command) {
        for (GenericCommand g : GeneralRegistry.GenericCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.TrustedCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ControllerCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanOwnerCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.GlobalCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanOpCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanHalfOpCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.AnonymonityCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        for (GenericCommand g : GeneralRegistry.ChanFounderCommands) {
            for(String commandid : g.getCommandID()){
                if(commandid.equalsIgnoreCase(Command)){
                    return g;
                }
            }
        }
        return null;

    }

    public static String getCommandChar(PircBotX botObject) {
        for (CommandChar d : GeneralRegistry.CommandChars) {
            if (d.getBot() == botObject) {
                return d.getCommandChar();
{'fraction_non_alphanumeric': 0.09303967245517436, 'fraction_numerical': 0.001976563602993082, 'mean_word_length': 1.5703918722786647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4041052', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1816, 'n_words': 351}