<commit_before>package de.prob2.ui.consoles.groovy;

import java.io.IOException;

import com.google.inject.Inject;
import com.google.inject.Singleton;

import de.prob2.ui.prob2fx.CurrentStage;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Singleton
public final class GroovyConsoleStage extends Stage {
	private static final Logger logger = LoggerFactory.getLogger(GroovyConsoleStage.class);

	@FXML private GroovyConsole groovyConsole;
	
	private final GroovyInterpreter interpreter;

	@Inject
	private GroovyConsoleStage(FXMLLoader loader, CurrentStage currentStage, GroovyInterpreter interpreter) {
		try {
			loader.setLocation(getClass().getResource("groovy_console_stage.fxml"));
			loader.setRoot(this);
			loader.setController(this);
			loader.load();
		} catch (IOException e) {
			logger.error("loading fxml failed", e);
		}
		this.interpreter = interpreter;
		
		currentStage.register(this);
	}
	
	@FXML
	public void initialize() {
		groovyConsole.setInterpreter(interpreter);<commit_msg>Fix Groovy console interpreter not being set properly<commit_after>package de.prob2.ui.consoles.groovy;

import java.io.IOException;

import com.google.inject.Inject;
import com.google.inject.Singleton;

import de.prob2.ui.prob2fx.CurrentStage;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Singleton
public final class GroovyConsoleStage extends Stage {
	private static final Logger logger = LoggerFactory.getLogger(GroovyConsoleStage.class);

	@FXML private GroovyConsole groovyConsole;
	
	private final GroovyInterpreter interpreter;

	@Inject
	private GroovyConsoleStage(FXMLLoader loader, CurrentStage currentStage, GroovyInterpreter interpreter) {
		this.interpreter = interpreter;
		
		try {
			loader.setLocation(getClass().getResource("groovy_console_stage.fxml"));
			loader.setRoot(this);
			loader.setController(this);
			loader.load();
		} catch (IOException e) {
			logger.error("loading fxml failed", e);
		}
		
		currentStage.register(this);
	}
	
	@FXML
	public void initialize() {
		groovyConsole.setInterpreter(interpreter);
{'fraction_non_alphanumeric': 0.09745194456861869, 'fraction_numerical': 0.004470272686633884, 'mean_word_length': 5.524781341107872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '1115604', 'n_tokens_mistral': 766, 'n_tokens_neox': 706, 'n_words': 144}