<commit_before>package seedu.watodo.logic.commands;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import seedu.watodo.commons.exceptions.IllegalValueException;

//@@author A0143076J
/**
 * Stores a map of alternatives command words, and their corresponding default
 * command word. Also stores a list of all the default command words of Watodo.
 */
public class AlternativeCommandsLibrary {

    public static final List<String> COMMANDS_WORDS = new ArrayList<String>() {
        {
            add(AddCommand.COMMAND_WORD);
            add(EditCommand.COMMAND_WORD);
            add(DeleteCommand.COMMAND_WORD);
            add(MarkCommand.COMMAND_WORD);
            add(UnmarkCommand.COMMAND_WORD);
            add(ListCommand.COMMAND_WORD);
            add(ListCommand.COMMAND_WORD + " " + ListAllCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListDeadlineCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListEventCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListFloatCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListDoneCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListUndoneCommand.ARGUMENT);
            add(FindCommand.COMMAND_WORD);
            add(UndoCommand.COMMAND_WORD);
            add(RedoCommand.COMMAND_WORD);
            add(SelectCommand.COMMAND_WORD);
            add(ShortcutCommand.COMMAND_WORD);
            add(SaveAsCommand.COMMAND_WORD);
            add(ViewFileCommand.COMMAND_WORD);
            add(ViewShortcutsCommand.COMMAND_WORD);
            add(ClearCommand.COMMAND_WORD);
            add(HelpCommand.COMMAND_WORD);
            add(ExitCommand.COMMAND_WORD);
        }
    };

    public static HashMap<String, String> altCommands = new HashMap<String, String>() {
        {
            put("a", AddCommand.COMMAND_WORD);
            put("e", EditCommand.COMMAND_WORD);
            put("d", DeleteCommand.COMMAND_WORD);
            put("del", DeleteCommand.COMMAND_WORD);
            put("l", ListCommand.COMMAND_WORD);
            put("m", MarkCommand.COMMAND_WORD);
            put("check", MarkCommand.COMMAND_WORD);
            put("um", UnmarkCommand.COMMAND_WORD);
            put("uncheck", MarkCommand.COMMAND_WORD);
            put("f", FindCommand.COMMAND_WORD);
            put("search", FindCommand.COMMAND_WORD);
            put("r", RedoCommand.COMMAND_WORD);
            put("u", UndoCommand.COMMAND_WORD);
            put("s", SelectCommand.COMMAND_WORD);

            for (String commandWord : AlternativeCommandsLibrary.COMMANDS_WORDS) {
                put(commandWord, commandWord);
            }
        }
    };

    /** Returns true if the given shortcutKey is an alternative command word. */
    public static boolean isAlternative(String shortcutKey) {
        assert shortcutKey != null;
        return altCommands.containsKey(shortcutKey) && altCommands.get(shortcutKey) != null;
    }

    /** Returns the standard CommandWord for the given shortcutKey. */
    public static String getStandardCommandWord(String shortcutKey) {
        assert shortcutKey != null && isAlternative(shortcutKey);
        return altCommands.get(shortcutKey);
    }
<commit_msg>fix typo in alternative view<commit_after>package seedu.watodo.logic.commands;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import seedu.watodo.commons.exceptions.IllegalValueException;

//@@author A0143076J
/**
 * Stores a map of alternatives command words, and their corresponding default
 * command word. Also stores a list of all the default command words of Watodo.
 */
public class AlternativeCommandsLibrary {

    public static final List<String> COMMANDS_WORDS = new ArrayList<String>() {
        {
            add(AddCommand.COMMAND_WORD);
            add(EditCommand.COMMAND_WORD);
            add(DeleteCommand.COMMAND_WORD);
            add(MarkCommand.COMMAND_WORD);
            add(UnmarkCommand.COMMAND_WORD);
            add(ListCommand.COMMAND_WORD);
            add(ListCommand.COMMAND_WORD + " " + ListAllCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListDeadlineCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListEventCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListFloatCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListDoneCommand.ARGUMENT);
            add(ListCommand.COMMAND_WORD + " " + ListUndoneCommand.ARGUMENT);
            add(FindCommand.COMMAND_WORD);
            add(UndoCommand.COMMAND_WORD);
            add(RedoCommand.COMMAND_WORD);
            add(SelectCommand.COMMAND_WORD);
            add(ShortcutCommand.COMMAND_WORD);
            add(SaveAsCommand.COMMAND_WORD);
            add(ViewFileCommand.COMMAND_WORD);
            add(ViewShortcutsCommand.COMMAND_WORD);
            add(ClearCommand.COMMAND_WORD);
            add(HelpCommand.COMMAND_WORD);
            add(ExitCommand.COMMAND_WORD);
        }
    };

    public static HashMap<String, String> altCommands = new HashMap<String, String>() {
        {
            put("a", AddCommand.COMMAND_WORD);
            put("e", EditCommand.COMMAND_WORD);
            put("d", DeleteCommand.COMMAND_WORD);
            put("del", DeleteCommand.COMMAND_WORD);
            put("l", ListCommand.COMMAND_WORD);
            put("m", MarkCommand.COMMAND_WORD);
            put("check", MarkCommand.COMMAND_WORD);
            put("um", UnmarkCommand.COMMAND_WORD);
            put("uncheck", UnmarkCommand.COMMAND_WORD);
            put("f", FindCommand.COMMAND_WORD);
            put("search", FindCommand.COMMAND_WORD);
            put("r", RedoCommand.COMMAND_WORD);
            put("u", UndoCommand.COMMAND_WORD);
            put("s", SelectCommand.COMMAND_WORD);

            for (String commandWord : AlternativeCommandsLibrary.COMMANDS_WORDS) {
                put(commandWord, commandWord);
            }
        }
    };

    /** Returns true if the given shortcutKey is an alternative command word. */
    public static boolean isAlternative(String shortcutKey) {
        assert shortcutKey != null;
        return altCommands.containsKey(shortcutKey) && altCommands.get(shortcutKey) != null;
    }

    /** Returns the standard CommandWord for the given shortcutKey. */
    public static String getStandardCommandWord(String shortcutKey) {
        assert shortcutKey != null && isAlternative(shortcutKey);
        return altCommands.get(shortcutKey);
    }

{'fraction_non_alphanumeric': 0.10313695485845448, 'fraction_numerical': 0.002142310635042081, 'mean_word_length': 2.678109172763084, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3524992', 'n_tokens_mistral': 1757, 'n_tokens_neox': 1792, 'n_words': 324}