<commit_before>package sec.web.renderer.utils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;

import com.google.gson.Gson;

import sec.web.renderer.model.CommonURL;

public class IoUtilities {
	private final static Logger LOGGER = Logger.getLogger(IoUtilities.class.getName());	
	private static Properties props;
	private CommonURL baseURL;
	private ArrayList<String> plugins = new ArrayList<String>();	
	private String pluginDirectory;
	private String localPluginPath;
	private final String DEFAULT_DIRECTORY_NAME = "plugins";
	private final String DEFAULT_SERVICE_NAME = "mil-symbology-renderer";

	public IoUtilities() {
		props = loadResource("properties/prop.properties", this.getClass().getClassLoader());
		loadCurrentWorkingDirectory();		
	}
	
	public IoUtilities(Properties props) {				
		try {
			setProps(props);
			getDirContent(pluginDirectory);
		} catch (FileNotFoundException e) {
			LOGGER.log(Level.INFO, e.getMessage());
		} catch (MalformedURLException e) {
			LOGGER.log(Level.INFO, e.getMessage());
		} catch (URISyntaxException e) {
			LOGGER.log(Level.INFO, e.getMessage());
		}
	}

	/**
	 * @param props
	 */
	private void createBaseUrl(Properties props) {<commit_msg>updated plugin relative path.<commit_after>package sec.web.renderer.utils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;

import com.google.gson.Gson;

import sec.web.renderer.model.CommonURL;

public class IoUtilities {
	private final static Logger LOGGER = Logger.getLogger(IoUtilities.class.getName());	
	private static Properties props;
	private CommonURL baseURL;
	private ArrayList<String> plugins = new ArrayList<String>();	
	private String pluginDirectory;
	private String localPluginPath;
	private final String DEFAULT_DIRECTORY_NAME = "plugins";
	private final String DEFAULT_SERVICE_NAME = "mil-sym-service";

	public IoUtilities() {
		props = loadResource("properties/prop.properties", this.getClass().getClassLoader());
		loadCurrentWorkingDirectory();		
	}
	
	public IoUtilities(Properties props) {				
		try {
			setProps(props);
			getDirContent(pluginDirectory);
		} catch (FileNotFoundException e) {
			LOGGER.log(Level.INFO, e.getMessage());
		} catch (MalformedURLException e) {
			LOGGER.log(Level.INFO, e.getMessage());
		} catch (URISyntaxException e) {
			LOGGER.log(Level.INFO, e.getMessage());
		}
	}

	/**
	 * @param props
	 */
	private void createBaseUrl(Properties props) {
{'fraction_non_alphanumeric': 0.11235584843492587, 'fraction_numerical': 0.0, 'mean_word_length': 5.234086242299795, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1466635', 'n_tokens_mistral': 944, 'n_tokens_neox': 920, 'n_words': 203}