// Path: src/cloneMatchingAlgorithms/CloneMatcher.java
// public interface CloneMatcher {
// 	public boolean isDetected(Clone clone) throws SQLException;
// 	public void close() throws SQLException;
// 	
// 	public static String getTableName(long toolid) {
// 		return "tool_" + toolid + "_clones";
// 	}
// 	
// 	public static CloneMatcher load(long toolid, String clazz, String params) throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// 		//long time = System.currentTimeMillis();
// 		Class<?> mClass = Class.forName("cloneMatchingAlgorithms." + clazz);
// 		Constructor<?> constructor = mClass.getConstructor(long.class, String.class);
// 		CloneMatcher matcher =  (CloneMatcher) constructor.newInstance(toolid, params);
// 		//time = System.currentTimeMillis() - time;
// 		//System.out.println("TIME: " + time);
// 		return matcher;
// 	}
// 	
// }
// 
// Path: src/database/Functionalities.java
// public class Functionalities {
// 	public static Set<Long> getFunctionalityIds() throws SQLException {
// 		String sql = "select id from functionalities";
// 		Set<Long> ids = new HashSet<Long>();
// 		
// 		Connection conn = BigCloneBenchDB.getConnection();
// 		Statement statement = conn.createStatement();
// 		ResultSet rs = statement.executeQuery(sql);
// 		while(rs.next()) ids.add(rs.getLong("id"));
// 		rs.close();
// 		statement.close();
// 		conn.close();
// 		
// 		return ids;
// 	}
// 	
// 	public static Functionality getFunctinality(long functionality_id) throws SQLException {
// 		Connection conn = BigCloneBenchDB.getConnection();
// 		Statement stmt = conn.createStatement();
// 		
// 		String sql = "SELECT id, name, description, search_heuristic FROM functionalities WHERE id = " + functionality_id;
// 		ResultSet rs = stmt.executeQuery(sql);
// 		rs.next();
// 		long id = rs.getLong(1);
// 		String name = rs.getString(2);
// 		String desc = rs.getString(3);
// 		String heuristic = rs.getString(4);
// 		rs.close();
// 		stmt.close();
// 		conn.close();
// 		return new Functionality(id, name, desc, heuristic);
// 	}
// 	
// }


import java.io.Serializable;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Set;
import cloneMatchingAlgorithms.CloneMatcher;
import database.Functionalities;
		str += "       MaxSize: " + max_size;
		str += "\n";
		str += " MinPrettySize: " + min_pretty_size;
		str += "\n";
		str += " MaxPrettySize: " + max_pretty_size;
		str += "\n";
		str += "     MinTokens: " + min_tokens;
		str += "\n";
		str += "     MaxTokens: " + max_tokens;
		str += "\n";
		str += "     MinJudges: " + min_judges;
		str += "\n";
		str += " MinConfidence: " + min_confidence;
		str += "\n";
		if(similarity_type == ToolEvaluator.SIMILARITY_TYPE_AVG) {
		str += "SimilarityType: SIMILARITY_TYPE_AVG";
		} else if (similarity_type == ToolEvaluator.SIMILARITY_TYPE_BOTH) {
		str += "SimilarityType: SIMILARITY_TYPE_BOTH";
		} else if (similarity_type == ToolEvaluator.SIMILARITY_TYPE_LINE) {
		str += "SimilarityType: SIMILARITY_TYPE_LINE";
		} else if (similarity_type == ToolEvaluator.SIMILARITY_TYPE_TOKEN) {
		str += "SimilarityType: SIMILARITY_TYPE_TOKEN";
		}
		str += "\n";
		return str;
	}
	
	private static final long serialVersionUID = 1L;
	
	private Long tool_id;
// Path: src/cloneMatchingAlgorithms/CloneMatcher.java
// public interface CloneMatcher {
// 	public boolean isDetected(Clone clone) throws SQLException;
// 	public void close() throws SQLException;
// 	
// 	public static String getTableName(long toolid) {
// 		return "tool_" + toolid + "_clones";
// 	}
// 	
// 	public static CloneMatcher load(long toolid, String clazz, String params) throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// 		//long time = System.currentTimeMillis();
// 		Class<?> mClass = Class.forName("cloneMatchingAlgorithms." + clazz);
// 		Constructor<?> constructor = mClass.getConstructor(long.class, String.class);
// 		CloneMatcher matcher =  (CloneMatcher) constructor.newInstance(toolid, params);
// 		//time = System.currentTimeMillis() - time;
// 		//System.out.println("TIME: " + time);
// 		return matcher;
// 	}
// 	
// }
// 
// Path: src/database/Functionalities.java
// public class Functionalities {
// 	public static Set<Long> getFunctionalityIds() throws SQLException {
// 		String sql = "select id from functionalities";
// 		Set<Long> ids = new HashSet<Long>();
// 		
// 		Connection conn = BigCloneBenchDB.getConnection();
// 		Statement statement = conn.createStatement();
// 		ResultSet rs = statement.executeQuery(sql);
// 		while(rs.next()) ids.add(rs.getLong("id"));
// 		rs.close();
// 		statement.close();
// 		conn.close();
// 		
// 		return ids;
// 	}
// 	
// 	public static Functionality getFunctinality(long functionality_id) throws SQLException {
// 		Connection conn = BigCloneBenchDB.getConnection();
// 		Statement stmt = conn.createStatement();
// 		
// 		String sql = "SELECT id, name, description, search_heuristic FROM functionalities WHERE id = " + functionality_id;
// 		ResultSet rs = stmt.executeQuery(sql);
// 		rs.next();
// 		long id = rs.getLong(1);
// 		String name = rs.getString(2);
// 		String desc = rs.getString(3);
// 		String heuristic = rs.getString(4);
// 		rs.close();
// 		stmt.close();
// 		conn.close();
// 		return new Functionality(id, name, desc, heuristic);
// 	}
// 	
// }


// Path: src/evaluate/ToolEvaluator.java
import java.io.Serializable;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Set;
import cloneMatchingAlgorithms.CloneMatcher;
import database.Functionalities;

		str += "       MaxSize: " + max_size;
		str += "\n";
		str += " MinPrettySize: " + min_pretty_size;
		str += "\n";
		str += " MaxPrettySize: " + max_pretty_size;
		str += "\n";
		str += "     MinTokens: " + min_tokens;
		str += "\n";
		str += "     MaxTokens: " + max_tokens;
		str += "\n";
		str += "     MinJudges: " + min_judges;
		str += "\n";
		str += " MinConfidence: " + min_confidence;
		str += "\n";
		if(similarity_type == ToolEvaluator.SIMILARITY_TYPE_AVG) {
		str += "SimilarityType: SIMILARITY_TYPE_AVG";
		} else if (similarity_type == ToolEvaluator.SIMILARITY_TYPE_BOTH) {
		str += "SimilarityType: SIMILARITY_TYPE_BOTH";
		} else if (similarity_type == ToolEvaluator.SIMILARITY_TYPE_LINE) {
		str += "SimilarityType: SIMILARITY_TYPE_LINE";
		} else if (similarity_type == ToolEvaluator.SIMILARITY_TYPE_TOKEN) {
		str += "SimilarityType: SIMILARITY_TYPE_TOKEN";
		}
		str += "\n";
		return str;
	}
	
	private static final long serialVersionUID = 1L;
	
	private Long tool_id;
	private CloneMatcher matcher;