<commit_before>package sample;

import java.io.File;

/**
 * Created by lennart on 3/20/2017.
 */
public class Downloader {
    public Downloader() {
    }

    public File[] getLocalFiles(String dir) {
        File localFolder = new File(dir);
        localFolder.mkdir();
        File[] filesList = localFolder.listFiles();
        for (File file : filesList) {
            if (file.isFile()) {
                System.out.println(file.getName());
            }
        }
        return filesList;
    }

}<commit_msg>added description for Downloader class added fileList check to prevent nullpointerexception added print if mod folder already exists<commit_after>package sample;

import java.io.File;

/**
 * Created by lennart on 3/20/2017.
 * This class will contain methods to download files via ftp and determine locally installed mods
 */
public class Downloader {
    Downloader() {
    }

    public File[] getLocalFiles(String dir) {
        File localFolder = new File(dir);
        boolean success = localFolder.mkdir();
        if(!success){
            System.out.println("Mod folder already exists");
        }
        File[] filesList = localFolder.listFiles();
        if (filesList != null) {
            for (File file : filesList)
                if (file.isFile()) System.out.println(file.getName());
        }
        return filesList;
    }

}
{'fraction_non_alphanumeric': 0.1054172767203514, 'fraction_numerical': 0.010248901903367497, 'mean_word_length': 2.3422982885085575, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '785101', 'n_tokens_mistral': 384, 'n_tokens_neox': 368, 'n_words': 111}