<commit_before>package titlePanes;

import java.io.File;
import backEnd.Controller;
import javafx.scene.control.Button;
import javafx.scene.control.TitledPane;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import javafx.stage.Stage;


public class LoadPropertiesTitlePane extends TitledPane {

    public LoadPropertiesTitlePane (Controller controller) {
        setText("Load Properties");
        VBox root = new VBox();
        root.setSpacing(30);

        Button button = new Button("Select Variable Properties");
        button.setOnAction(event -> openFile(controller));
        root.getChildren().add(button);
        setContent(root);

    }

    private void openFile (Controller contr) {
        FileChooser varPropertiesChooser = new FileChooser();
        varPropertiesChooser.setTitle("Upload Image");
        varPropertiesChooser.getExtensionFilters()
                .addAll(
                        new FileChooser.ExtensionFilter("VariableProperties",
                                                        "*.properties"));

        Stage fileStage = new Stage();
        File file = varPropertiesChooser.showOpenDialog(fileStage);
        if (file != null)
            contr.setVariableProperties(file);
    }
}<commit_msg>initial directory set to resources<commit_after>package titlePanes;

import java.io.File;
import backEnd.Controller;
import javafx.scene.control.Button;
import javafx.scene.control.TitledPane;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import javafx.stage.Stage;


public class LoadPropertiesTitlePane extends TitledPane {

    public String DEFAULT_XML_DIRECTORY = "./src/resources";
    
    public LoadPropertiesTitlePane (Controller controller) {
        setText("Load Properties");
        VBox root = new VBox();
        root.setSpacing(30);

        Button button = new Button("Select Variable Properties");
        button.setOnAction(event -> openFile(controller));
        root.getChildren().add(button);
        setContent(root);

    }

    private void openFile (Controller contr) {
        File currentFile = new File(DEFAULT_XML_DIRECTORY);
        FileChooser varPropertiesChooser = new FileChooser();
        varPropertiesChooser.setTitle("Upload Image");
        varPropertiesChooser.getExtensionFilters()
                .addAll(
                        new FileChooser.ExtensionFilter("VariableProperties",
                                                        "*.properties"));
        varPropertiesChooser.setInitialDirectory(currentFile);
        
        Stage fileStage = new Stage();
        File file = varPropertiesChooser.showOpenDialog(fileStage);
        if (file != null)
            contr.setVariableProperties(file);
    }
}
{'fraction_non_alphanumeric': 0.09140568099053169, 'fraction_numerical': 0.0014566642388929353, 'mean_word_length': 2.6971736204576042, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2001570', 'n_tokens_mistral': 709, 'n_tokens_neox': 671, 'n_words': 151}