<commit_before>import java.util.HashSet;

public class Buttons {
	public static final int API_VERSION = 1;

	public static final char PLAYER_1_START = 's';
	public static final char PLAYER_1_JOYSTICK_UP = 'w';
	public static final char PLAYER_1_JOYSTICK_UP_RIGHT = 'e';
	public static final char PLAYER_1_JOYSTICK_RIGHT = 'd';
	public static final char PLAYER_1_JOYSTICK_DOWN_RIGHT = 'c';
	public static final char PLAYER_1_JOYSTICK_DOWN = 'x';
	public static final char PLAYER_1_JOYSTICK_DOWN_LEFT = 'z';
	public static final char PLAYER_1_JOYSTICK_LEFT = 'a';
	public static final char PLAYER_1_JOYSTICK_UP_LEFT = 'q';
	public static final char PLAYER_1_BUTTON_1 = 'r';
	public static final char PLAYER_1_BUTTON_2 = 't';
	public static final char PLAYER_1_BUTTON_3 = 'f';
	public static final char PLAYER_1_BUTTON_4 = 'g';
	public static final char PLAYER_1_BUTTON_5 = 'v';
	public static final char PLAYER_1_BUTTON_6 = 'b';

	public static final char PLAYER_2_START = 'j';
	public static final char PLAYER_2_JOYSTICK_UP = 'u';
	public static final char PLAYER_2_JOYSTICK_UP_RIGHT = 'i';
	public static final char PLAYER_2_JOYSTICK_RIGHT = 'k';
	public static final char PLAYER_2_JOYSTICK_DOWN_RIGHT = ',';
	public static final char PLAYER_2_JOYSTICK_DOWN = 'm';
	public static final char PLAYER_2_JOYSTICK_DOWN_LEFT = 'n';
	public static final char PLAYER_2_JOYSTICK_LEFT = 'h';
	public static final char PLAYER_2_JOYSTICK_UP_LEFT = 'y';
	public static final char PLAYER_2_BUTTON_1 = 'o';
	public static final char PLAYER_2_BUTTON_2 = 'p';
	public static final char PLAYER_2_BUTTON_3 = 'l';
	public static final char PLAYER_2_BUTTON_4 = ';';
	public static final char PLAYER_2_BUTTON_5 = '.';
	public static final char PLAYER_2_BUTTON_6 = '/';

	/**
	 * Return true if the given key is any fight pad button. Does not include
	 * start buttons.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isAnyButton(char key) {
		return isPlayer1Key(key) || isPlayer2Key(key);
	}

	/**
	 * Return true if the given key is any player's start button.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isStartButton(char key) {
		return key == PLAYER_1_START || key == PLAYER_2_START;
	}

	/**
	 * Return true if the given key is any direction on any joystick.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isJoystick(char key) {
		return isPlayer1Joystick(key) || isPlayer2Joystick(key);
	}

	/**
	 * Return true if the given key is a valid buton on the fight pad for player
	 * 1 to press. This does not include the start button.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isPlayer1Button(char key) {
		return key == PLAYER_1_BUTTON_1 || key == PLAYER_1_BUTTON_2 ||
			key == PLAYER_1_BUTTON_3 || key == PLAYER_1_BUTTON_4 ||
			key == PLAYER_1_BUTTON_5 || key == PLAYER_1_BUTTON_6;<commit_msg>fix semantics of isAnyButton<commit_after>import java.util.HashSet;

public class Buttons {
	public static final int API_VERSION = 1;

	public static final char PLAYER_1_START = 's';
	public static final char PLAYER_1_JOYSTICK_UP = 'w';
	public static final char PLAYER_1_JOYSTICK_UP_RIGHT = 'e';
	public static final char PLAYER_1_JOYSTICK_RIGHT = 'd';
	public static final char PLAYER_1_JOYSTICK_DOWN_RIGHT = 'c';
	public static final char PLAYER_1_JOYSTICK_DOWN = 'x';
	public static final char PLAYER_1_JOYSTICK_DOWN_LEFT = 'z';
	public static final char PLAYER_1_JOYSTICK_LEFT = 'a';
	public static final char PLAYER_1_JOYSTICK_UP_LEFT = 'q';
	public static final char PLAYER_1_BUTTON_1 = 'r';
	public static final char PLAYER_1_BUTTON_2 = 't';
	public static final char PLAYER_1_BUTTON_3 = 'f';
	public static final char PLAYER_1_BUTTON_4 = 'g';
	public static final char PLAYER_1_BUTTON_5 = 'v';
	public static final char PLAYER_1_BUTTON_6 = 'b';

	public static final char PLAYER_2_START = 'j';
	public static final char PLAYER_2_JOYSTICK_UP = 'u';
	public static final char PLAYER_2_JOYSTICK_UP_RIGHT = 'i';
	public static final char PLAYER_2_JOYSTICK_RIGHT = 'k';
	public static final char PLAYER_2_JOYSTICK_DOWN_RIGHT = ',';
	public static final char PLAYER_2_JOYSTICK_DOWN = 'm';
	public static final char PLAYER_2_JOYSTICK_DOWN_LEFT = 'n';
	public static final char PLAYER_2_JOYSTICK_LEFT = 'h';
	public static final char PLAYER_2_JOYSTICK_UP_LEFT = 'y';
	public static final char PLAYER_2_BUTTON_1 = 'o';
	public static final char PLAYER_2_BUTTON_2 = 'p';
	public static final char PLAYER_2_BUTTON_3 = 'l';
	public static final char PLAYER_2_BUTTON_4 = ';';
	public static final char PLAYER_2_BUTTON_5 = '.';
	public static final char PLAYER_2_BUTTON_6 = '/';

	/**
	 * Return true if the given key is any fight pad button. Does not include
	 * start buttons or joystick directions.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isAnyButton(char key) {
		return isPlayer1Button(key) || isPlayer2Button(key);
	}

	/**
	 * Return true if the given key is any player's start button.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isStartButton(char key) {
		return key == PLAYER_1_START || key == PLAYER_2_START;
	}

	/**
	 * Return true if the given key is any direction on any joystick.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isJoystick(char key) {
		return isPlayer1Joystick(key) || isPlayer2Joystick(key);
	}

	/**
	 * Return true if the given key is a valid buton on the fight pad for player
	 * 1 to press. This does not include the start button.
	 *
	 * @param key the character keycode to be tested against
	 */
	public static boolean isPlayer1Button(char key) {
		return key == PLAYER_1_BUTTON_1 || key == PLAYER_1_BUTTON_2 ||
			key == PLAYER_1_BUTTON_3 || key == PLAYER_1_BUTTON_4 ||
			key == PLAYER_1_BUTTON_5 || key == PLAYER_1_BUTTON_6;
{'fraction_non_alphanumeric': 0.07958361316319677, 'fraction_numerical': 0.021155137676292814, 'mean_word_length': 4.593427230046949, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3365850', 'n_tokens_mistral': 2151, 'n_tokens_neox': 2032, 'n_words': 669}