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

import com.google.gson.internal.LinkedTreeMap;
import com.techcavern.wavetact.utils.ErrorUtils;
import com.techcavern.wavetact.utils.GeneralRegistry;
import com.techcavern.wavetact.utils.fileUtils.JSONFile;
import com.techcavern.wavetact.utils.objects.PermChannel;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by jztech101 on 7/4/14.
 */
public class PermChannelUtils {
    @SuppressWarnings("unchecked")
    public static void loadPermChannels() {
        JSONFile file = new JSONFile("PermUsers.json");
        if (file.exists()) {
            try {

                List<LinkedTreeMap> permChannels = file.read(List.class);

                GeneralRegistry.PermChannels.clear();
                GeneralRegistry.PermChannels.addAll(permChannels.stream().map(perms -> new PermChannel((String) perms.get("Channel"),
                        ((Double) perms.get("PermLevel")).intValue(),
                        (Boolean) perms.get("auto"),
                        (String) perms.get("PermNetwork"),
                        (String) perms.get("permuser"))).collect(Collectors.toList()));


            } catch (FileNotFoundException e) {
                ErrorUtils.handleException(e);<commit_msg>oopsx2<commit_after>package com.techcavern.wavetact.utils.objects.objectUtils;

import com.google.gson.internal.LinkedTreeMap;
import com.techcavern.wavetact.utils.ErrorUtils;
import com.techcavern.wavetact.utils.GeneralRegistry;
import com.techcavern.wavetact.utils.fileUtils.JSONFile;
import com.techcavern.wavetact.utils.objects.PermChannel;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by jztech101 on 7/4/14.
 */
public class PermChannelUtils {
    @SuppressWarnings("unchecked")
    public static void loadPermChannels() {
        JSONFile file = new JSONFile("PermChannels.json");
        if (file.exists()) {
            try {

                List<LinkedTreeMap> permChannels = file.read(List.class);

                GeneralRegistry.PermChannels.clear();
                GeneralRegistry.PermChannels.addAll(permChannels.stream().map(perms -> new PermChannel((String) perms.get("Channel"),
                        ((Double) perms.get("PermLevel")).intValue(),
                        (Boolean) perms.get("auto"),
                        (String) perms.get("PermNetwork"),
                        (String) perms.get("permuser"))).collect(Collectors.toList()));


            } catch (FileNotFoundException e) {
                ErrorUtils.handleException(e);
{'fraction_non_alphanumeric': 0.12137931034482759, 'fraction_numerical': 0.005172413793103448, 'mean_word_length': 3.012448132780083, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7063515', 'n_tokens_mistral': 861, 'n_tokens_neox': 832, 'n_words': 131}