<commit_before>package com.mitc;

import com.mitc.spring.AppConfig;
import com.mitc.spring.AppContext;
import com.mitc.util.crypto.FileEncryptor;
import com.mitc.javafx.Browser;
import com.mitc.config.Settings;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.MessageFormat;

public class Toc extends Application {

    private static Stage stage;
    private static Settings settings;

    private Logger logger = LogManager.getLogger(Toc.class);

    public static void main(String[] args) {

        ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
        AppContext ctx = (AppContext) context.getBean("AppContext");
        ctx.launch();

        settings = ctx.getSettings();

        launch(args);
    }

    @Override
    public void start(Stage stage) throws IOException, URISyntaxException {

        Toc.stage = stage;

        // load the site
        URL url = new File(settings.getRoot() + "site/html/index.html").toURI().toURL();
        logger.info(MessageFormat.format("Browsing file: {0}", url.toString()));

        Browser browser = new Browser(url.toString(), settings.isEncrypted(), true);

        Scene scene = new Scene(browser, settings.getWidth(), settings.getHeight(), Color.web("#000000"));
        scene.setFill(Color.TRANSPARENT);

        stage.setOnCloseRequest(we -> {
            FileEncryptor.getInstance().init(settings.isEncrypted());
            System.exit(0);
        });

        stage.setTitle("Table of contents v.1");
        stage.setScene(scene);
        stage.show();

    }

    public static void reform() {
        stage.setWidth(settings.getWidth());
        stage.setHeight(settings.getHeight());
    }

}<commit_msg>maven refactoring<commit_after>package com.mitc;

import com.mitc.spring.AppConfig;
import com.mitc.spring.AppContext;
import com.mitc.util.crypto.FileEncryptor;
import com.mitc.javafx.Browser;
import com.mitc.config.Settings;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.MessageFormat;

public class Toc extends Application {

    private static Stage stage;
    private static Settings settings;

    private Logger logger = LogManager.getLogger(Toc.class);

    public static void main(String[] args) {

        ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
        AppContext ctx = (AppContext) context.getBean("AppContext");
        ctx.launch();

        settings = ctx.getSettings();

        launch(args);
    }

    @Override
    public void start(Stage stage) throws IOException, URISyntaxException {

        Toc.stage = stage;

        // load the site
        URL url = new File(settings.getRoot() + "site/html/index.html").toURI().toURL();
        logger.info(MessageFormat.format("Browsing file: {0}", url.toString()));

        Browser browser = new Browser(url.toString(), settings.isEncrypted(), true);

        Scene scene = new Scene(browser, settings.getWidth(), settings.getHeight(), Color.web("#000000"));
        scene.setFill(Color.TRANSPARENT);

        stage.setOnCloseRequest(we -> {
            FileEncryptor.getInstance().init(settings.isEncrypted());
            System.exit(0);
        });

        stage.setTitle("Table Of Contents v0.1");
        stage.setScene(scene);
        stage.show();

    }

    public static void reform() {
        stage.setWidth(settings.getWidth());
        stage.setHeight(settings.getHeight());
    }

}
{'fraction_non_alphanumeric': 0.11822660098522167, 'fraction_numerical': 0.005395261552897021, 'mean_word_length': 3.5458422174840085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4812603', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1181, 'n_words': 247}