<commit_before>package com.github.aureliano.evtbridge.core;

import java.io.File;
import java.util.Map;
import java.util.Properties;

import org.apache.log4j.Logger;

import com.github.aureliano.evtbridge.common.helper.StringHelper;
import com.github.aureliano.evtbridge.core.agent.IAgent;
import com.github.aureliano.evtbridge.core.command.CollectEventsCommand;
import com.github.aureliano.evtbridge.core.config.EventCollectorConfiguration;
import com.github.aureliano.evtbridge.core.config.IConfiguration;
import com.github.aureliano.evtbridge.core.event.AfterCollectorsEvent;
import com.github.aureliano.evtbridge.core.event.BeforeCollectorsEvent;
import com.github.aureliano.evtbridge.core.helper.ConfigHelper;
import com.github.aureliano.evtbridge.core.helper.LoggerHelper;
import com.github.aureliano.evtbridge.core.listener.EventsCollectorListener;
import com.github.aureliano.evtbridge.core.profile.IProfile;
import com.github.aureliano.evtbridge.core.profile.JvmProfile;
import com.github.aureliano.evtbridge.core.register.ApiServiceRegistrator;

public class EventsCollector {

private static final Logger logger = Logger.getLogger(EventsCollector.class);
	
	private EventCollectorConfiguration configuration;
	private CollectEventsCommand commandExecutor;
	
	public EventsCollector() {
		super();
	}
	
	public void execute() {
		this._execute();
	}
	
	private void _execute() {
		this.configureThreadName();
		this.configureLogger();
		
		if (this.configuration == null) {
			this.configuration = new EventCollectorConfiguration();
			logger.info("Using default event collector configuration.");
		}
		<commit_msg>Check whether a basic configuration was provided.<commit_after>package com.github.aureliano.evtbridge.core;

import java.io.File;
import java.util.Map;
import java.util.Properties;

import org.apache.log4j.Logger;

import com.github.aureliano.evtbridge.common.exception.EventBridgeException;
import com.github.aureliano.evtbridge.common.helper.StringHelper;
import com.github.aureliano.evtbridge.core.agent.IAgent;
import com.github.aureliano.evtbridge.core.command.CollectEventsCommand;
import com.github.aureliano.evtbridge.core.config.EventCollectorConfiguration;
import com.github.aureliano.evtbridge.core.config.IConfiguration;
import com.github.aureliano.evtbridge.core.event.AfterCollectorsEvent;
import com.github.aureliano.evtbridge.core.event.BeforeCollectorsEvent;
import com.github.aureliano.evtbridge.core.helper.ConfigHelper;
import com.github.aureliano.evtbridge.core.helper.LoggerHelper;
import com.github.aureliano.evtbridge.core.listener.EventsCollectorListener;
import com.github.aureliano.evtbridge.core.profile.IProfile;
import com.github.aureliano.evtbridge.core.profile.JvmProfile;
import com.github.aureliano.evtbridge.core.register.ApiServiceRegistrator;

public class EventsCollector {

private static final Logger logger = Logger.getLogger(EventsCollector.class);
	
	private EventCollectorConfiguration configuration;
	private CollectEventsCommand commandExecutor;
	
	public EventsCollector() {
		super();
	}
	
	public void execute() {
		if (this.configuration == null) {
			throw new EventBridgeException("The configuration model " +
					EventCollectorConfiguration.class.getName() + " must be provided.");
		}
		
		this._execute();
	}
	
	private void _execute() {
		this.configureThreadName();
		this.configureLogger();
		
		if (this.configuration == null) {
			this.configuration = new EventCollectorConfiguration();
			logger.info("Using default event collector configuration.");
		}
		
{'fraction_non_alphanumeric': 0.10189105278012983, 'fraction_numerical': 0.0005644933672029354, 'mean_word_length': 5.949019607843137, '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': '538007', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1045, 'n_words': 168}