<commit_before>package guitests;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import javafx.scene.input.KeyCode;

//@@author A0147980U
public class ContentAssistTests extends DoistGUITest {
    GuiRobot bot = new GuiRobot();
    @Test
    public void testCorrectSuggestionsDisplayed() {
        correctSuggestionsDisplayedWhenEnter("f", "f");
    }

    @Test
    public void testCorrectSuggestionsDisplayedWithCompleteCommandWord() {
        correctSuggestionsDisplayedWhenEnter("fin", "fin");
    }

    @Test
    public void testCorrectSingleSuggestionsDisplayedWithCompleteCommandWord() {
        correctSuggestionsDisplayedWhenEnter("find", "find");
    }

    @Test
    public void testNoSuggestionsDisplayedBecuaseOfSpace() {
        correctSuggestionsDisplayedWhenEnter("find ", "find");
    }

    @Test
    public void testNoSuggestionsDisplayedBecuaseOfNoMatch() {
        correctSuggestionsDisplayedWhenEnter("no suggesion will match me", "me");
    }

    @Test
    public void testSuggestionOnCorrectParameterKey() {
        correctSuggestionsDisplayedWhenEnter("do task \\fro", "\\fro");
    }

    @Test
    public void testSuggestionOnIncorrectParameterKey() {
        correctSuggestionsDisplayedWhenEnter("do task \\incorrect_key", "\\incorrect_key");
    }

    @Test
    public void testCompleteByTappingTap() {
        String input = "view_alia";
        commandBox.enterCommand(input);
        bot.type(KeyCode.TAB);
        assertTrue("view_alias".equals(commandBox.getCommandInput()));
    }

    @Test
    public void testCompleteKeyByTappingTap() {
        String input = "do task \\unde";
        commandBox.enterCommand(input);
        bot.type(KeyCode.TAB);
        assertTrue("do task \\under".equals(commandBox.getCommandInput()));
    }

    private void correctSuggestionsDisplayedWhenEnter(String input, String lastWord) {
        commandBox.enterCommand(input);
        assertCorrectSuggestions(lastWord);
    }
}


<commit_msg>fix typo<commit_after>package guitests;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import javafx.scene.input.KeyCode;

//@@author A0147980U
public class ContentAssistTests extends DoistGUITest {
    GuiRobot bot = new GuiRobot();
    @Test
    public void testCorrectSuggestionsDisplayed() {
        correctSuggestionsDisplayedWhenEnter("f", "f");
    }

    @Test
    public void testCorrectSuggestionsDisplayedWithCompleteCommandWord() {
        correctSuggestionsDisplayedWhenEnter("fin", "fin");
    }

    @Test
    public void testCorrectSingleSuggestionsDisplayedWithCompleteCommandWord() {
        correctSuggestionsDisplayedWhenEnter("find", "find");
    }

    @Test
    public void testNoSuggestionsDisplayedBecuaseOfSpace() {
        correctSuggestionsDisplayedWhenEnter("find ", "find");
    }

    @Test
    public void testNoSuggestionsDisplayedBecuaseOfNoMatch() {
        correctSuggestionsDisplayedWhenEnter("no suggesion will match me", "me");
    }

    @Test
    public void testSuggestionOnCorrectParameterKey() {
        correctSuggestionsDisplayedWhenEnter("do task \\fro", "\\fro");
    }

    @Test
    public void testSuggestionOnIncorrectParameterKey() {
        correctSuggestionsDisplayedWhenEnter("do task \\incorrect_key", "\\incorrect_key");
    }

    @Test
    public void testCompleteByTappingTab() {
        String input = "view_alia";
        commandBox.enterCommand(input);
        bot.type(KeyCode.TAB);
        assertTrue("view_alias".equals(commandBox.getCommandInput()));
    }

    @Test
    public void testCompleteKeyByTappingTab() {
        String input = "do task \\unde";
        commandBox.enterCommand(input);
        bot.type(KeyCode.TAB);
        assertTrue("do task \\under".equals(commandBox.getCommandInput()));
    }

    private void correctSuggestionsDisplayedWhenEnter(String input, String lastWord) {
        commandBox.enterCommand(input);
        assertCorrectSuggestions(lastWord);
    }
}



{'fraction_non_alphanumeric': 0.09977324263038549, 'fraction_numerical': 0.003527336860670194, 'mean_word_length': 3.584295612009238, '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': '2550819', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1111, 'n_words': 205}