<commit_before>package at.ac.tuwien.dsg.myx.util;

import java.util.Properties;

import at.ac.tuwien.dsg.myx.monitor.MyxMonitoringImplementation;
import at.ac.tuwien.dsg.myx.monitor.em.EventManager;
import at.ac.tuwien.dsg.myx.monitor.em.EventManagerImpl;
import edu.uci.isr.myx.fw.IMyxBrick;
import edu.uci.isr.myx.fw.IMyxBrickDescription;
import edu.uci.isr.myx.fw.IMyxContainer;
import edu.uci.isr.myx.fw.IMyxImplementation;
import edu.uci.isr.myx.fw.IMyxName;
import edu.uci.isr.myx.fw.MyxUtils;

/**
 * This class is an extension of {@link MyxUtils} which provides the
 * {@link MyxMonitoringImplementation} as the and additional implementation.
 * 
 * @author bernd.rathmanner
 * 
 */
public final class MyxMonitoringUtils {

    private static IMyxImplementation currentImplementation;
    private static EventManager currentEventManager = new EventManagerImpl();

    private MyxMonitoringUtils() {
    }

    /**
     * Initialize the current {@link MyxMonitoringImplementation}.
     * @param architecturRuntimeId
     * @param eventManager
     */
    public static void initMontioringImplementation(String architecturRuntimeId, EventManager eventManager) {
        currentImplementation = new MyxMonitoringImplementation(architecturRuntimeId, eventManager);
    }

    /**
     * Get the current {@link MyxMonitoringImplementation}.
     * @return
     */
    public static IMyxImplementation getMonitoringImplementation() {
        if (currentImplementation == null) {
            throw new NullPointerException("MyxMonitoringImplementation has not been initialized!");
        }
        return currentImplementation;
    }

    /**
     * Get the current {@link EventManager}.
     * @return
     */
    public static EventManager getEventManager() {
        return currentEventManager;
    }

    public static IMyxImplementation getDefaultImplementation() {
        return MyxUtils.getDefaultImplementation();
    }

    public static IMyxName createName(String name) {
        return MyxUtils.createName(name);
    }

    public static IMyxBrickDescription getContainerBrickDescription() {
        return MyxUtils.getContainerBrickDescription();
    }

    public static IMyxName getName(IMyxBrick brick) {
        return MyxUtils.getName(brick);
    }

    public static boolean nulleq(Object o1, Object o2) {
        return MyxUtils.nulleq(o1, o2);
    }

    public static int hc(Object o) {
        return MyxUtils.hc(o);
    }

    public static boolean classeq(Object o1, Object o2) {
        return MyxUtils.classeq(o1, o2);
    }

    public static String pathToString(IMyxName[] path) {
        return MyxUtils.pathToString(path);
    }

    public static IMyxContainer resolvePath(IMyxContainer rootContainer, IMyxName[] path) {
        return MyxUtils.resolvePath(rootContainer, path);<commit_msg>MyxMonitoringUtils.getContainerBrickDescription now returns with initialized init properties<commit_after>package at.ac.tuwien.dsg.myx.util;

import java.util.Properties;

import at.ac.tuwien.dsg.myx.monitor.MyxMonitoringImplementation;
import at.ac.tuwien.dsg.myx.monitor.em.EventManager;
import at.ac.tuwien.dsg.myx.monitor.em.EventManagerImpl;
import edu.uci.isr.myx.fw.IMyxBrick;
import edu.uci.isr.myx.fw.IMyxBrickDescription;
import edu.uci.isr.myx.fw.IMyxContainer;
import edu.uci.isr.myx.fw.IMyxImplementation;
import edu.uci.isr.myx.fw.IMyxName;
import edu.uci.isr.myx.fw.MyxContainer;
import edu.uci.isr.myx.fw.MyxJavaClassBrickDescription;
import edu.uci.isr.myx.fw.MyxUtils;

/**
 * This class is an extension of {@link MyxUtils} which provides the
 * {@link MyxMonitoringImplementation} as the and additional implementation.
 * 
 * @author bernd.rathmanner
 * 
 */
public final class MyxMonitoringUtils {

    private static IMyxImplementation currentImplementation;
    private static EventManager currentEventManager = new EventManagerImpl();

    protected static final IMyxBrickDescription CONTAINER_BRICK_DESCRIPTION = new MyxJavaClassBrickDescription(
            new Properties(), MyxContainer.class.getName());

    private MyxMonitoringUtils() {
    }

    /**
     * Initialize the current {@link MyxMonitoringImplementation}.
     * 
     * @param architecturRuntimeId
     * @param eventManager
     */
    public static void initMontioringImplementation(String architecturRuntimeId, EventManager eventManager) {
        currentImplementation = new MyxMonitoringImplementation(architecturRuntimeId, eventManager);
    }

    /**
     * Get the current {@link MyxMonitoringImplementation}.
     * 
     * @return
     */
    public static IMyxImplementation getMonitoringImplementation() {
        if (currentImplementation == null) {
            throw new NullPointerException("MyxMonitoringImplementation has not been initialized!");
        }
        return currentImplementation;
    }

    /**
     * Get the current {@link EventManager}.
     * 
     * @return
     */
    public static EventManager getEventManager() {
        return currentEventManager;
    }

    public static IMyxImplementation getDefaultImplementation() {
        return MyxUtils.getDefaultImplementation();
    }

    public static IMyxName createName(String name) {
        return MyxUtils.createName(name);
    }

    public static IMyxBrickDescription getContainerBrickDescription() {
        return CONTAINER_BRICK_DESCRIPTION;
    }

    public static IMyxName getName(IMyxBrick brick) {
        return MyxUtils.getName(brick);
    }

    public static boolean nulleq(Object o1, Object o2) {
        return MyxUtils.nulleq(o1, o2);
    }

    public static int hc(Object o) {
        return MyxUtils.hc(o);
    }

    public static boolean classeq(Object o1, Object o2) {
        return MyxUtils.classeq(o1, o2);
    }

    public static String pathToString(IMyxName[] path) {
        return MyxUtils.pathToString(path);
    }

    public static IMyxContainer resolvePath(IMyxContainer rootContainer, IMyxName[] path) {
        return MyxUtils.resolvePath(rootContainer, path);
{'fraction_non_alphanumeric': 0.08750623856263517, 'fraction_numerical': 0.0026617867243387125, 'mean_word_length': 3.5135135135135136, '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': '378113', 'n_tokens_mistral': 1861, 'n_tokens_neox': 1809, 'n_words': 383}