<commit_before>package io.leao.codecolors.plugin.file;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class FileUtils {
    public static Object readFrom(File input) {
        try {
            ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(input));
            Object object = inputStream.readObject();
            inputStream.close();
            return object;
        } catch (Exception e) {
            System.out.println("Failed to read object from " + input.getPath() + ": " + e.getMessage());
            return null;
        }
    }

    public static void writeTo(Serializable object, File output) {
        try {
            ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(output));
            outputStream.writeObject(object);
            outputStream.close();
        } catch (IOException e) {
            System.out.println("Failed to write object to " + output.getPath() + ": " + e.getMessage());
        }
    }

    public static String getQualifier(File folder) {
        return getQualifier(folder.getName());
    }

    public static String getQualifier(String folderName) {
        String[] parts = folderName.split("\\-", 2);
        return parts.length > 1 ? parts[1] : "";
    }
}<commit_msg>Uses Exception toString() instead of getMessage()<commit_after>package io.leao.codecolors.plugin.file;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class FileUtils {
    public static Object readFrom(File input) {
        try {
            ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(input));
            Object object = inputStream.readObject();
            inputStream.close();
            return object;
        } catch (Exception e) {
            System.out.println("Failed to read object from " + input.getPath() + ": " + e.toString());
            return null;
        }
    }

    public static void writeTo(Serializable object, File output) {
        try {
            ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(output));
            outputStream.writeObject(object);
            outputStream.close();
        } catch (IOException e) {
            System.out.println("Failed to write object to " + output.getPath() + ": " + e.toString());
        }
    }

    public static String getQualifier(File folder) {
        return getQualifier(folder.getName());
    }

    public static String getQualifier(String folderName) {
        String[] parts = folderName.split("\\-", 2);
        return parts.length > 1 ? parts[1] : "";
    }
}
{'fraction_non_alphanumeric': 0.10860655737704918, 'fraction_numerical': 0.0020491803278688526, 'mean_word_length': 2.67964824120603, 'pattern_counts': {'":': 4, '<': 3, '<?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': '3636194', 'n_tokens_mistral': 756, 'n_tokens_neox': 747, 'n_words': 191}