<commit_before>package com.project.ardrone_android_geii;

import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;

public class GereManette
{
	
	public GereManette()
	{
		
		
	}
	
	/**

     * This method gives the state of the button : <i>pressed or released</i>.

     * @param keyEvent 
	 * The <i>event</i> generated by the action on the button.
	 
     * @return
     * A boolean that is <b>true</b> if the button is pressed and <b>false</b> if it is released.

     */
	public boolean GetKeyState( KeyEvent keyEvent ) {
		
		boolean bState = false;
		
		if(keyEvent.getAction() == keyEvent.ACTION_DOWN)
		{
			bState = true;
		}
		else if(keyEvent.getAction() == keyEvent.ACTION_UP)
		{
			bState = false;
		}
		
		return bState;
		
	}	
	
	/**

     * This method gives a number of the button that has generated the <i>event</i>.

     * @param keyEvent 
	 * The <i>event</i> generated by the action on the button.
	 
     * @return
     * An <i>integer</i> that represent the button that has generated the <i>event</i>:</br>
     * <b>0</b> if it is <i>none</i>. </br>
     * <b>1</b> if it is <i>A</i>. </br>
     * <b>2</b> if it is <i>B</i>. </br>
     * <b>3</b> if it is <i>X</i>. </br>
     * <b>4</b> if it is <i>Y</i>. </br>
     * <b>5</b> if it is <i>START</i>. </br>
     * <b>6</b> if it is <i>SELECT</i>. </br>
     * <b>7</b> if it is <i>R1</i>. </br>
     * <b>8</b> if it is <i>L1</i>. </br>
     * <b>9</b> if it is <i>R2</i>. </br>
     * <b>10</b> if it is <i>L2</i>. </br>

     */
	 public int GetKey( KeyEvent keyEvent ) {
	    	
	    	int iKey = 0;
	    	
	    		
		    		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_A)
			   		{
			   			iKey = 1;
			   			
			   		}
			   		
			   		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_B)
			   		{
			   			iKey = 2;
			   			
			   		}
			   		
			   		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_X)
			   		{
			   			iKey = 3;
			   			
			   		}
			   		
			   		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_Y)
			   		{
			   			iKey = 4;
			   			
			   		}
			   		<commit_msg>Fixing JavaDoc Syntax with <br> tags<commit_after>package com.project.ardrone_android_geii;

import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;

public class GereManette
{
	
	public GereManette()
	{
		
		
	}
	
	/**

     * This method gives the state of the button : <i>pressed or released</i>.

     * @param keyEvent 
	 * The <i>event</i> generated by the action on the button.
	 
     * @return
     * A boolean that is <b>true</b> if the button is pressed and <b>false</b> if it is released.

     */
	public boolean GetKeyState( KeyEvent keyEvent ) {
		
		boolean bState = false;
		
		if(keyEvent.getAction() == keyEvent.ACTION_DOWN)
		{
			bState = true;
		}
		else if(keyEvent.getAction() == keyEvent.ACTION_UP)
		{
			bState = false;
		}
		
		return bState;
		
	}	
	
	/**

     * This method gives a number of the button that has generated the <i>event</i>.

     * @param keyEvent 
	 * The <i>event</i> generated by the action on the button.
	 
     * @return
     * <br> An <i>integer</i> that represent the button that has generated the <i>event</i>:</br>
     * <br> <b>0</b> if it is <i>none</i>. </br>
     * <br> <b>1</b> if it is <i>A</i>. </br>
     * <br> <b>2</b> if it is <i>B</i>. </br>
     * <br> <b>3</b> if it is <i>X</i>. </br>
     * <br> <b>4</b> if it is <i>Y</i>. </br>
     * <br> <b>5</b> if it is <i>START</i>. </br>
     * <br> <b>6</b> if it is <i>SELECT</i>. </br>
     * <br> <b>7</b> if it is <i>R1</i>. </br>
     * <br> <b>8</b> if it is <i>L1</i>. </br>
     * <br> <b>9</b> if it is <i>R2</i>. </br>
     * <br> <b>10</b> if it is <i>L2</i>. </br>

     */
	 public int GetKey( KeyEvent keyEvent ) {
	    	
	    	int iKey = 0;
	    	
	    		
		    		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_A)
			   		{
			   			iKey = 1;
			   			
			   		}
			   		
			   		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_B)
			   		{
			   			iKey = 2;
			   			
			   		}
			   		
			   		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_X)
			   		{
			   			iKey = 3;
			   			
			   		}
			   		
			   		if(keyEvent.getKeyCode() == keyEvent.KEYCODE_BUTTON_Y)
			   		{
			   			iKey = 4;
			   			
			   		}
			   		
{'fraction_non_alphanumeric': 0.1640175074867542, 'fraction_numerical': 0.009675190048375951, 'mean_word_length': 1.8416230366492146, 'pattern_counts': {'":': 0, '<': 160, '<?xml version=': 0, '>': 160, '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': '2137379', 'n_tokens_mistral': 1999, 'n_tokens_neox': 1719, 'n_words': 411}