<commit_before>package client;

import java.rmi.RemoteException;

import org.apache.axis2.AxisFault;

import client.ShoppingCartWSStub.*;


public class AutomaticTests {
	
	private static int testCase = 0;
	private static int testOk = 0;
	private static int testError = 0;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ShoppingCartWSStub stub = null;
		try {
			stub = new ShoppingCartWSStub();
		} catch (AxisFault e) {
			error("AxisFault", "OK");
			System.exit(1);
		}
		
		/**
		 * Prueba de login incorrecto
		 */
		Login l = new Login();
		l.setUsername("malo");
		l.setPassword("<PASSWORD>");
		try {
			
			LoginResponse res = stub.login(l);
			if(res.getLoginResponse())
				error("true", "false");
			else
				ok();
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
		/**
		 * Prueba de llamada sin estar logueado
		 */
		try {
			stub.getProductsList();
			error("ok", "NotValidSessionError");
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotValidSessionError e) {
			ok();
		}
		
		
		/**
		 * Prueba de login correcto
		 */
		l.setUsername("Jose");
		l.setPassword("<PASSWORD>");
		try {
			
			LoginResponse res = stub.login(l);
			if(res.getLoginResponse())
				ok();
			else
				error("false", "true");
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		

	}
	
	private static void error(String obtenido, String esperado){
		System.out.println("[ERROR] Test "+testCase+": se esperaba '"+esperado+
				"' pero se ha obtenido '"+obtenido+"'");
		testCase++;
	}
	
	private static void ok(){
		System.out.println("[OK] Test "+testCase);
		testCase++;
	}

}
<commit_msg>Empty commit message<commit_after>package client;

import java.rmi.RemoteException;

import org.apache.axis2.AxisFault;

import client.ShoppingCartWSStub.*;


public class AutomaticTests {
	
	private static int testCase = 0;
	private static int testOk = 0;
	private static int testError = 0;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ShoppingCartWSStub stub = null;
		try {
			stub = new ShoppingCartWSStub();
		} catch (AxisFault e) {
			error("AxisFault", "OK");
			System.exit(1);
		}
		
		/**
		 * Prueba de login incorrecto
		 */
		Login l = new Login();
		l.setUsername("malo");
		l.setPassword("<PASSWORD>");
		try {
			
			LoginResponse res = stub.login(l);
			if(res.getLoginResponse())
				error("true", "false");
			else
				ok();
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
		/**
		 * Prueba de llamada sin estar logueado
		 */
		try {
			stub.getProductsList();
			error("ok", "NotValidSessionError");
		} catch (RemoteException e) {
			e.printStackTrace();
		} catch (NotValidSessionError e) {
			ok();
		}
		
		
		/**
		 * Prueba de login correcto
		 */
		l.setUsername("Jose");
		l.setPassword("<PASSWORD>");
		try {
			
			LoginResponse res = stub.login(l);
			if(res.getLoginResponse())
				ok();
			else
				error("false", "true");
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		
		
		finalizeTest();
		

	}
	
	private static void finalizeTest() {
		System.out.println("\n\n TEST FINALIZADO ("+testOk+"/"+testCase+")");	
	}

	private static void error(String obtenido, String esperado){
		System.out.println("[ERROR] Test "+testCase+": se esperaba '"+esperado+
				"' pero se ha obtenido '"+obtenido+"'");
		testCase++;
	}
	
	private static void ok(){
		System.out.println("[OK] Test "+testCase);
		testCase++;
	}

}

{'fraction_non_alphanumeric': 0.15382387022016222, 'fraction_numerical': 0.0028968713789107765, 'mean_word_length': 3.1854545454545455, 'pattern_counts': {'":': 2, '<': 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': '2540367', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1162, 'n_words': 277}