<commit_before>package edu.pdx.cs410J.dmitriev;

import edu.pdx.cs410J.AirlineDumper;

import javax.xml.soap.Text;
import java.io.*;
import java.util.Collection;

/**
 * Created by sanek94cool on 14.07.2017.
 */
public class TextDumper implements AirlineDumper<Airline>{
    /**
     * Given an Airline object write its info to a file by calling
     * writeFile() method.
     * @param airline
     * @throws IOException
     */

    private String fileName;

    /**
     * Constructor for TextDumper
     * @param newFileName
     *                      the name of the file being created
     */
    TextDumper(String newFileName)
    {
        this.fileName = newFileName;
    }

    /**
     * Call writeFile() method to dump the Airline and add it to text file
     * @param airline
     *                  Airline to dump
     * @throws IOException
     *                  If IO error is found
     */
    @Override
    public void dump(Airline airline) throws IOException {
        writeFile(airline);
    }

    /**
     * given the Airline objects with (maybe?) some of the
     * Flight objects inside write their info to a text file
     * With an file name being airline name. The first line is always
     * an airline name. The next ones are lines containing the info about
     * each flight.
     * @param airline
     *                  given Airline object that should be written to a text file
     */
    public void writeFile(Airline airline) throws IOException
    {
        Writer writer = null;

        try {
            writer = new BufferedWriter(new FileWriter(new File(fileName)));

            //writer = new BufferedWriter(new FileWriter(new File("src\\main\\java\\edu\\pdx\\cs410J\\dmitriev\\"+
                                                                //airline.getName()+".txt")));
            writer.write(airline.getName()+"\n");
            Collection<Flight> flightList = airline.getFlights();

            for (Flight flight : flightList)
            {
                writer.write(flight.getNumber()+";"+flight.getSource()+";"+flight.getDepartDate()+";"+
                        flight.getDepartTime()+";"+flight.getDestination()+";"+flight.getArriveDate()+";"+flight.getArriveTime()+"\n");
            }

            writer.close();
            //writer = null;
            System.gc();
        } catch (IOException ex) {
            writer.close();
            System.gc();
            ex.printStackTrace();
        }
    }
}
<commit_msg>No use of PrintStackTrace() anymore<commit_after>package edu.pdx.cs410J.dmitriev;

import edu.pdx.cs410J.AirlineDumper;

import javax.xml.soap.Text;
import java.io.*;
import java.util.Collection;

/**
 * Created by sanek94cool on 14.07.2017.
 */
public class TextDumper implements AirlineDumper<Airline>{
    /**
     * Given an Airline object write its info to a file by calling
     * writeFile() method.
     * @param airline
     * @throws IOException
     */

    private String fileName;

    /**
     * Constructor for TextDumper
     * @param newFileName
     *                      the name of the file being created
     */
    TextDumper(String newFileName)
    {
        this.fileName = newFileName;
    }

    /**
     * Call writeFile() method to dump the Airline and add it to text file
     * @param airline
     *                  Airline to dump
     * @throws IOException
     *                  If IO error is found
     */
    @Override
    public void dump(Airline airline) throws IOException {
        writeFile(airline);
    }

    /**
     * given the Airline objects with (maybe?) some of the
     * Flight objects inside write their info to a text file
     * With an file name being airline name. The first line is always
     * an airline name. The next ones are lines containing the info about
     * each flight.
     * @param airline
     *                  given Airline object that should be written to a text file
     */
    public void writeFile(Airline airline) throws IOException
    {
        Writer writer = null;

        try {
            writer = new BufferedWriter(new FileWriter(new File(fileName)));

            //writer = new BufferedWriter(new FileWriter(new File("src\\main\\java\\edu\\pdx\\cs410J\\dmitriev\\"+
                                                                //airline.getName()+".txt")));
            writer.write(airline.getName()+"\n");
            Collection<Flight> flightList = airline.getFlights();

            for (Flight flight : flightList)
            {
                writer.write(flight.getNumber()+";"+flight.getSource()+";"+flight.getDepartDate()+";"+
                        flight.getDepartTime()+";"+flight.getDestination()+";"+flight.getArriveDate()+";"+flight.getArriveTime()+"\n");
            }

            writer.close();
            //writer = null;
            System.gc();
        } catch (IOException ex) {
            writer.close();
            System.gc();
            System.err.println("Error writing a file, please check your arguments");
        }
    }
}

{'fraction_non_alphanumeric': 0.10774410774410774, 'fraction_numerical': 0.007526242820360468, 'mean_word_length': 1.8676888131743328, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '255719', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1332, 'n_words': 389}