<commit_before>package imperial.modaclouds.monitoring.datacollectors.basic;


public class Config {

	private static Config _instance = null;
	private String mmIP;
	private int mmPort;
	private int dcSyncPeriod = 30;
	private int resourcesKeepAlivePeriod = 60;
	private String cloudProviderId;
	private String cloudProviderType;
	private String paasServiceId;
	private String paasServiceType;
	private String vmId;
	private String vmType;
	private String locationId;
	private String locationtype;
	private String internalComponentId;
	private String internalComponentType;

	public static Config getInstance() throws ConfigurationException {
		if (_instance == null)
			_instance = new Config();
		return _instance;
	}

	private Config() throws ConfigurationException {
		try {
			mmIP = getMandatoryEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_MANAGER_IP);
			String mmPortString = getMandatoryEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_MANAGER_PORT);
			mmPort = Integer.parseInt(mmPortString);

			String dcSyncPeriodString = getOptionalEnvVar(
					Env.MODACLOUDS_TOWER4CLOUDS_DC_SYNC_PERIOD,
					Integer.toString(dcSyncPeriod));
			dcSyncPeriod = Integer.parseInt(dcSyncPeriodString);
			
			String resourcesKeepAlivePeriodString = getOptionalEnvVar(
					Env.MODACLOUDS_TOWER4CLOUDS_RESOURCES_KEEP_ALIVE_PERIOD,
					Integer.toString(dcSyncPeriod));
			resourcesKeepAlivePeriod = Integer.parseInt(resourcesKeepAlivePeriodString);
			
			cloudProviderId = getOptionalEnvVar(
					Env.MODACLOUDS_TOWER4CLOUDS_CLOUD_PROVIDER_ID);
			cloudProviderType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_CLOUD_PROVIDER_TYPE);
			paasServiceId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_PAAS_SERVICE_ID);
			paasServiceType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_PAAS_SERVICE_TYPE);
			vmId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_VM_ID);
			vmType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_VM_TYPE);
			locationId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_LOCATION_ID);
			locationtype = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_LOCATION_TYPE);
			internalComponentId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_INTERNAL_COMPONENT_ID);
			internalComponentType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_INTERNAL_COMPONENT_TYPE);
			

		} catch (Exception e) {
			throw new ConfigurationException(
					"Could not configure properly the data collector", e);
		}<commit_msg>fixed default keep alive value<commit_after>package imperial.modaclouds.monitoring.datacollectors.basic;


public class Config {

	private static Config _instance = null;
	private String mmIP;
	private int mmPort;
	private int dcSyncPeriod = 30;
	private int resourcesKeepAlivePeriod = 60;
	private String cloudProviderId;
	private String cloudProviderType;
	private String paasServiceId;
	private String paasServiceType;
	private String vmId;
	private String vmType;
	private String locationId;
	private String locationtype;
	private String internalComponentId;
	private String internalComponentType;

	public static Config getInstance() throws ConfigurationException {
		if (_instance == null)
			_instance = new Config();
		return _instance;
	}

	private Config() throws ConfigurationException {
		try {
			mmIP = getMandatoryEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_MANAGER_IP);
			String mmPortString = getMandatoryEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_MANAGER_PORT);
			mmPort = Integer.parseInt(mmPortString);

			String dcSyncPeriodString = getOptionalEnvVar(
					Env.MODACLOUDS_TOWER4CLOUDS_DC_SYNC_PERIOD,
					Integer.toString(dcSyncPeriod));
			dcSyncPeriod = Integer.parseInt(dcSyncPeriodString);
			
			String resourcesKeepAlivePeriodString = getOptionalEnvVar(
					Env.MODACLOUDS_TOWER4CLOUDS_RESOURCES_KEEP_ALIVE_PERIOD,
					Integer.toString(resourcesKeepAlivePeriod));
			resourcesKeepAlivePeriod = Integer.parseInt(resourcesKeepAlivePeriodString);
			
			cloudProviderId = getOptionalEnvVar(
					Env.MODACLOUDS_TOWER4CLOUDS_CLOUD_PROVIDER_ID);
			cloudProviderType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_CLOUD_PROVIDER_TYPE);
			paasServiceId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_PAAS_SERVICE_ID);
			paasServiceType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_PAAS_SERVICE_TYPE);
			vmId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_VM_ID);
			vmType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_VM_TYPE);
			locationId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_LOCATION_ID);
			locationtype = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_LOCATION_TYPE);
			internalComponentId = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_INTERNAL_COMPONENT_ID);
			internalComponentType = getOptionalEnvVar(Env.MODACLOUDS_TOWER4CLOUDS_INTERNAL_COMPONENT_TYPE);
			

		} catch (Exception e) {
			throw new ConfigurationException(
					"Could not configure properly the data collector", e);
		}
{'fraction_non_alphanumeric': 0.061245603145044486, 'fraction_numerical': 0.0074487895716946, 'mean_word_length': 6.61259842519685, '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': '7153448', 'n_tokens_mistral': 1763, 'n_tokens_neox': 1595, 'n_words': 262}