<commit_before>package com.audiophile.t2m.text;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Created by Tobi on 06.09.2017.
 */
public class TextReader {
    private String fileContent;

    public TextReader(String inputFile){
        try {
            fileContent = readTxtFile(inputFile);
        } catch (FileNotFoundException e) {
            System.out.flush();
            System.err.println(e.getMessage());
            return;
        } catch (IOException e) {
            System.out.flush();
            System.err.println("Error reading file \"" + inputFile + "\"");
            return;
        }
    }

     /**
     * Reads a given txt file
     *
     * @param fileName String Path to the file
     * @return String Plain File content
     * @throws IOException Throws an error if the file was not found or could not be read
     */
    private String readTxtFile(String fileName) throws IOException {
        File file = new File(fileName);
        if (!file.exists())
            throw new FileNotFoundException("The file \"" + fileName + "\" does not exist");

        FileInputStream stream = new FileInputStream(file);
        byte[] data = new byte[(int) file.length()];
        int fileLength = stream.read(data);
        stream.close();

        System.out.println("File length: " + fileLength + " bytes");
        return new String(data, "UTF-8");
    }


    public String getFileContent(){
        return fileContent;
    }
}<commit_msg>TextReader Exit Status<commit_after>package com.audiophile.t2m.text;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Created by Tobi on 06.09.2017.
 */
public class TextReader {
    private String fileContent;

    public TextReader(String inputFile){
        try {
            fileContent = readTxtFile(inputFile);
        } catch (FileNotFoundException e) {
            System.out.flush();
            System.err.println(e.getMessage());
            System.exit(1);
        } catch (IOException e) {
            System.out.flush();
            System.err.println("Error reading file \"" + inputFile + "\"");
            System.exit(1);
        }
    }

     /**
     * Reads a given txt file
     *
     * @param fileName String Path to the file
     * @return String Plain File content
     * @throws IOException Throws an error if the file was not found or could not be read
     */
    private String readTxtFile(String fileName) throws IOException {
        File file = new File(fileName);
        if (!file.exists())
            throw new FileNotFoundException("The file \"" + fileName + "\" does not exist");

        FileInputStream stream = new FileInputStream(file);
        byte[] data = new byte[(int) file.length()];
        int fileLength = stream.read(data);
        stream.close();

        System.out.println("File length: " + fileLength + " bytes");
        return new String(data, "UTF-8");
    }


    public String getFileContent(){
        return fileContent;
    }
}
{'fraction_non_alphanumeric': 0.11235955056179775, 'fraction_numerical': 0.007062600321027288, 'mean_word_length': 2.2973544973544975, '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': '5553260', 'n_tokens_mistral': 861, 'n_tokens_neox': 840, 'n_words': 244}