<commit_before>//Jim
public class SearchEngine extends ApplicationProgram {

	@Override
	void run() {
		// TODO Auto-generated method stub

	}

}
<commit_msg>added sub menu inside search engine<commit_after>import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Scanner;

//Jim
public class SearchEngine extends ApplicationProgram {

	@Override
	void run() {
		int userMenuInput = getMenuInput();		
		if (userMenuInput==1){
			
		}
		
	}
	
	/*private ResultSet getDriveLicenceByLicenceNo(String licenceNo){
		return runQuery("select ");
	}*/
	
	
	
	
	
	private int getMenuInput() {

		Scanner scanner = new Scanner(System.in);
		int userInput = -1;

		while (userInput < 1 || userInput > 6) {
			System.out.println("Search Engine");
			System.out.println("Please choose from the following options:");
			System.out.println("1: Search drive licence by driver licence number");
			System.out.println("2: Search drive licence by given name");
			System.out.println("3: Search violation record by driver licence number");
			System.out.println("4: Search violation record by SIN");
			System.out.println("5: Search vehicle history by vehicle serial number ");
			System.out.println("6: Back to main menu");

			if (!scanner.hasNextInt()) {
				System.out.print("ERROR: ");
				System.out.println("Not an integer. Please enter an integer");
				System.out.println();
				scanner.next();
				continue;
			}

			userInput = scanner.nextInt();
			if (userInput > 6 || userInput < 1) {
				System.out.print("ERROR: ");
				System.out.println("Not a valid menu option. Please try again");
				System.out.println();
			}
		}

		return userInput;
	}
	
	
	/*
	 * Description: Helper function that runs a given query.
	 * Input: String query, 
	 * Output: ResultSet resultSet.
	 */
	private ResultSet runQuery(String query) throws SQLException{
		Connection connection = DatabaseConnection.getConnection();
		ResultSet resultSet = connection.createStatement().executeQuery(query);
		return resultSet;		
	}
}

{'fraction_non_alphanumeric': 0.12003919647231749, 'fraction_numerical': 0.005879470847623714, 'mean_word_length': 3.7710280373831777, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1420320', 'n_tokens_mistral': 698, 'n_tokens_neox': 587, 'n_words': 171}