<commit_before>package edu.washington.cs.dericp.diffutils;

import edu.washington.cs.dericp.diffutils.change.LineChange;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;


/**
 * This class provides utility functions that are used throughout diff-utils.
 */
public class Utils {

    public static final boolean DEBUG = true;

    /**
     * Reads the file at the specified pathname and returns it as a List of
     * Strings, one per line of the file.
     *
     * @param pathname a String, the path of the file on the machine
     * @return a List of Strings representing the lines of the file
     * at the specified pathname
     */
    public static List<String> readFile(String pathname) {
        List<String> lines = new ArrayList<String>();
        try {
            BufferedReader reader = new BufferedReader(new FileReader(pathname));
            while (reader.ready()) {
                lines.add(reader.readLine());
            }
            reader.close();
            return lines;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
<commit_msg>Added private constructor to Utils.<commit_after>package edu.washington.cs.dericp.diffutils;

import edu.washington.cs.dericp.diffutils.change.LineChange;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;


/**
 * This class provides utility functions that are used throughout diff-utils.
 * Utils is a collection of static methods and does not represent anything.
 */
public class Utils {

    public static final boolean DEBUG = true;

    /**
     * This private constructor prevents clients from instantiating Utils.
     */
    private Utils() {

    }

    /**
     * Reads the file at the specified pathname and returns it as a List of
     * Strings, one per line of the file.
     *
     * @param pathname a String, the path of the file on the machine
     * @return a List of Strings representing the lines of the file
     * at the specified pathname
     */
    public static List<String> readFile(String pathname) {
        List<String> lines = new ArrayList<String>();
        try {
            BufferedReader reader = new BufferedReader(new FileReader(pathname));
            while (reader.ready()) {
                lines.add(reader.readLine());
            }
            reader.close();
            return lines;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

{'fraction_non_alphanumeric': 0.08776311095255084, 'fraction_numerical': 0.0, 'mean_word_length': 2.527044025157233, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3748242', 'n_tokens_mistral': 763, 'n_tokens_neox': 751, 'n_words': 254}