<commit_before>package main;

import org.apache.commons.io.monitor.FileAlterationMonitor;
import org.apache.commons.io.monitor.FileAlterationObserver;

import java.io.File;
import java.io.IOException;

import controllers.InitialMenuController;
import views.InitialMenuView;
import stats.StatUpdateListener;
import stats.Subject;
import models.Roster;

public class MainDriver {
	
	final static String statFilepath = "resources/users/";
	final static String rosterFilepath = "resources/Rosters/";
	final static File resFolder = new File(statFilepath);
	public static Subject statListener = null;
	
	public static void main(String [] args){
		
		statListener = setupFileMonitor(resFolder, 5000);
		statListener.attach(Roster.getInstance(statListener));
		
		InitialMenuView v = new InitialMenuView();
		InitialMenuController con = new InitialMenuController(v);
	
	}
	
	public static Subject setupFileMonitor(File folder, int pollingMsecs){
		FileAlterationObserver observer = new FileAlterationObserver(folder);
		FileAlterationMonitor monitor = new FileAlterationMonitor(pollingMsecs);
		StatUpdateListener listener = new StatUpdateListener();
		
		observer.addListener(listener);
		monitor.addObserver(observer);
		try {
			monitor.start();
		} catch (Exception e) {<commit_msg>Update MainDriver<commit_after>package main;

import org.apache.commons.io.monitor.FileAlterationMonitor;
import org.apache.commons.io.monitor.FileAlterationObserver;

import java.io.File;
import java.io.IOException;
import java.util.Set;

import controllers.InitialMenuController;
import controllers.LeagueController;
import views.InitialMenuView;
import views.SoccerLeagueView;
import stats.StatUpdateListener;
import stats.Subject;
import models.League;
import models.LeagueFactory;
import models.Roster;
import models.SoccerTeam;

public class MainDriver {
	
	final static String statFilepath = "resources/users/";
	final static String rosterFilepath = "resources/Rosters/";
	final static File resFolder = new File(statFilepath);
	public static Subject statListener = null;
	
	public static void main(String [] args){
		
		statListener = setupFileMonitor(resFolder, 5000);
		statListener.attach(Roster.getInstance(statListener));
		
		InitialMenuView v = new InitialMenuView();
		InitialMenuController con = new InitialMenuController(v);
	}
	
	public static Subject setupFileMonitor(File folder, int pollingMsecs){
		FileAlterationObserver observer = new FileAlterationObserver(folder);
		FileAlterationMonitor monitor = new FileAlterationMonitor(pollingMsecs);
		StatUpdateListener listener = new StatUpdateListener();
		
		observer.addListener(listener);
		monitor.addObserver(observer);
		try {
			monitor.start();
		} catch (Exception e) {
{'fraction_non_alphanumeric': 0.0855045871559633, 'fraction_numerical': 0.0029357798165137615, 'mean_word_length': 6.080519480519481, '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': '668040', 'n_tokens_mistral': 817, 'n_tokens_neox': 733, 'n_words': 187}