<commit_before>
import java.io.FileReader;

import java.util.ArrayList;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Set;
import javax.management.MBeanServerConnection;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;


public class genericJMX {

	public static void main(String[] args) throws Exception {
		
		genericJMX cfg = new genericJMX();
		ArrayList<Metric> mbeans = new ArrayList<Metric>();
		
		echo("looking for configure.json in: " + System.getProperty("user.dir"));
		
	    JSONParser parser = new JSONParser();
	      
		JSONObject configuration = null;
		
		configuration = (JSONObject) parser.parse(new FileReader("configure.json"));

	    String port = (String) configuration.get("port");
	    if (port == null) {System.out.println("No port sepcified"); System.exit(1);}
	    
	    String host = (String) configuration.get("host");
	    if (host == null) {host = "localhost";}

	    String source = (String) configuration.get("source");
	    if (source == null) {

	   	try
	    	{
	    	    InetAddress addr;<commit_msg>Took out echo<commit_after>
import java.io.FileReader;

import java.util.ArrayList;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Set;
import javax.management.MBeanServerConnection;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;


public class genericJMX {

	public static void main(String[] args) throws Exception {
		
		genericJMX cfg = new genericJMX();
		ArrayList<Metric> mbeans = new ArrayList<Metric>();
		
		//echo("looking for configure.json in: " + System.getProperty("user.dir"));
		
	    JSONParser parser = new JSONParser();
	      
		JSONObject configuration = null;
		
		configuration = (JSONObject) parser.parse(new FileReader("configure.json"));

	    String port = (String) configuration.get("port");
	    if (port == null) {System.out.println("No port sepcified"); System.exit(1);}
	    
	    String host = (String) configuration.get("host");
	    if (host == null) {host = "localhost";}

	    String source = (String) configuration.get("source");
	    if (source == null) {

	   	try
	    	{
	    	    InetAddress addr;
{'fraction_non_alphanumeric': 0.12067696835908756, 'fraction_numerical': 0.0007358351729212656, 'mean_word_length': 4.259187620889748, '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': '3548779', 'n_tokens_mistral': 829, 'n_tokens_neox': 765, 'n_words': 187}