<commit_before>package me.jesensky.dan.playertracker.net;


import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;

public final class NetUtils {
    private NetUtils(){
    }

    public static byte[] byteListToArray(List<Byte> bytes){
        byte[] b = new byte[bytes.size()];
        for(int i = 0; i < b.length; i++)
            b[i] = bytes.get(i);
        return b;
    }

    public static byte[] getMD5Hash(byte[] b){
        try {
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            md5.update(b);
            return md5.digest();
        }catch(NoSuchAlgorithmException e){
            //ignore, md5 is always there
        }
        return null;
    }

    public static byte[] stringToBytes(String s){
        try {
            return s.getBytes("UTF-8");
        }catch(UnsupportedEncodingException e){
            //if your computer does not have UTF-8, there's something severely wrong with it, or you're running windows 95.
        }
        return null;
    }

    public static String byteToString(byte[] b){
        try{
            return new String(b, "UTF-8");
        }catch(UnsupportedEncodingException e){
            //stop running windows 95
        }
        return null;
    }<commit_msg>Typo; bytes and not byte... A single byte would not be very useful<commit_after>package me.jesensky.dan.playertracker.net;


import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;

public final class NetUtils {
    private NetUtils(){
    }

    public static byte[] byteListToArray(List<Byte> bytes){
        byte[] b = new byte[bytes.size()];
        for(int i = 0; i < b.length; i++)
            b[i] = bytes.get(i);
        return b;
    }

    public static byte[] getMD5Hash(byte[] b){
        try {
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            md5.update(b);
            return md5.digest();
        }catch(NoSuchAlgorithmException e){
            //ignore, md5 is always there
        }
        return null;
    }

    public static byte[] stringToBytes(String s){
        try {
            return s.getBytes("UTF-8");
        }catch(UnsupportedEncodingException e){
            //if your computer does not have UTF-8, there's something severely wrong with it, or you're running windows 95.
        }
        return null;
    }

    public static String bytesToString(byte[] b){
        try{
            return new String(b, "UTF-8");
        }catch(UnsupportedEncodingException e){
            //stop running windows 95
        }
        return null;
    }
{'fraction_non_alphanumeric': 0.10571428571428572, 'fraction_numerical': 0.01, 'mean_word_length': 2.2121559633027523, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5107840', 'n_tokens_mistral': 812, 'n_tokens_neox': 788, 'n_words': 224}