<commit_before>package intellimate.izou.testHelper;

import intellimate.izou.events.Event;
import intellimate.izou.events.LocalEventManager;
import intellimate.izou.fullplugintesting.TestAddOn;
import intellimate.izou.main.Main;
import intellimate.izou.system.Context;
import intellimate.izou.system.Identifiable;
import intellimate.izou.system.Identification;
import intellimate.izou.system.IdentificationManager;

import java.util.Optional;

import static org.junit.Assert.*;

/**
 * Helper class for Unit-testing
 */
public class IzouTest implements Identifiable{
    private static Main staticMain;
    public Main main;
    public final String id;
    private IdentificationManager identificationManager;
    private static int identificationNumber;
    private static int eventNumber;
    private static final class Lock { }
    private final Object lock = new Lock();
    private TestAddOn testAddOn = new TestAddOn(getID());
    private Context  context = new Context(testAddOn, main, "debug");

    /**
     * creates a new instance of IzouTest
     * @param isolated whether the fields (manager etc.) should be Isolated from all the other instances.
     */
    public IzouTest(boolean isolated, String id) {
        if(isolated) {
            main = new Main(null, true);
        } else {
            if(staticMain == null) {
                staticMain = new Main(null, true);
            }
            this.main = staticMain;
        }
        this.id = id;
        identificationManager = IdentificationManager.getInstance();
        identificationManager.registerIdentification(this);
    }

    /**
     * An ID must always be unique.
     * A Class like Activator or OutputPlugin can just provide their .class.getCanonicalName()
     * If you have to implement this interface multiple times, just concatenate unique Strings to
     * .class.getCanonicalName()
     *
     * @return A String containing an ID
     */
    @Override
    public String getID() {<commit_msg>fixed FATAL bug in IzouTest<commit_after>package intellimate.izou.testHelper;

import intellimate.izou.events.Event;
import intellimate.izou.events.LocalEventManager;
import intellimate.izou.fullplugintesting.TestAddOn;
import intellimate.izou.main.Main;
import intellimate.izou.system.Context;
import intellimate.izou.system.Identifiable;
import intellimate.izou.system.Identification;
import intellimate.izou.system.IdentificationManager;

import java.util.Optional;

import static org.junit.Assert.*;

/**
 * Helper class for Unit-testing
 */
public class IzouTest implements Identifiable{
    private static Main staticMain;
    public Main main;
    public final String id;
    private IdentificationManager identificationManager;
    private static int identificationNumber;
    private static int eventNumber;
    private static final class Lock { }
    private final Object lock = new Lock();
    private TestAddOn testAddOn = new TestAddOn(getID());
    private Context  context;

    /**
     * creates a new instance of IzouTest
     * @param isolated whether the fields (manager etc.) should be Isolated from all the other instances.
     */
    public IzouTest(boolean isolated, String id) {
        if(isolated) {
            main = new Main(null, true);
        } else {
            if(staticMain == null) {
                staticMain = new Main(null, true);
            }
            this.main = staticMain;
        }
        context = new Context(testAddOn, main, "debug");
        this.id = id;
        identificationManager = IdentificationManager.getInstance();
        identificationManager.registerIdentification(this);
    }

    /**
     * An ID must always be unique.
     * A Class like Activator or OutputPlugin can just provide their .class.getCanonicalName()
     * If you have to implement this interface multiple times, just concatenate unique Strings to
     * .class.getCanonicalName()
     *
     * @return A String containing an ID
     */
    @Override
    public String getID() {
{'fraction_non_alphanumeric': 0.0802299425143714, 'fraction_numerical': 0.0, 'mean_word_length': 3.0920245398773005, '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': '6268359', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1057, 'n_words': 333}