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

import java.util.EmptyStackException;

import seedu.taskboss.commons.exceptions.IllegalValueException;

//@@author A0138961W
/**
 * Undoes the most recent operation entered by user.
 */

public class UndoCommand extends Command {

    public static final String COMMAND_WORD = "undo";
    public static final String COMMAND_WORD_SHORT = "u";

    public static final String MESSAGE_USAGE = COMMAND_WORD + "/" + COMMAND_WORD_SHORT
            + ": Undoes the most recent operation entered by user\n"
            + "Example: " + COMMAND_WORD + " || " + COMMAND_WORD_SHORT;

    public static final String MESSAGE_SUCCESS = "The most recent operation has been undone!";

    public static final String MESSAGE_WITHOUT_PREVIOUS_OPERATION = "Cannot undo.";

    public UndoCommand() {}


    @Override
    public CommandResult execute() {
        assert model != null;
        try {
            model.undoTaskboss();
            model.updateFilteredListToShowAll();
            return new CommandResult(MESSAGE_SUCCESS);
        } catch (EmptyStackException ese) {
            return new CommandResult(MESSAGE_WITHOUT_PREVIOUS_OPERATION);
        } catch (IllegalValueException e) {
            return new CommandResult(e.getMessage());
        }
    }
}
<commit_msg>Update UndoCommand.java<commit_after>package seedu.taskboss.logic.commands;

import java.util.EmptyStackException;

import seedu.taskboss.commons.exceptions.IllegalValueException;

//@@author A0138961W
/**
 * Undoes the most recent operation entered by user.
 */

public class UndoCommand extends Command {

    public static final String COMMAND_WORD = "undo";
    public static final String COMMAND_WORD_SHORT = "u";

    public static final String MESSAGE_USAGE = COMMAND_WORD + "/" + COMMAND_WORD_SHORT
            + ": Undoes the most recent operation entered by user\n"
            + "Example: " + COMMAND_WORD + " || " + COMMAND_WORD_SHORT;

    public static final String MESSAGE_SUCCESS = "The most recent operation has been undone";

    public static final String MESSAGE_WITHOUT_PREVIOUS_OPERATION = "Cannot undo.";

    public UndoCommand() {}


    @Override
    public CommandResult execute() {
        assert model != null;
        try {
            String input = model.undoTaskbossInput();
            model.undoTaskboss();
            model.updateFilteredListToShowAll();
            return new CommandResult(MESSAGE_SUCCESS + ":" + input);
        } catch (EmptyStackException ese) {
            return new CommandResult(MESSAGE_WITHOUT_PREVIOUS_OPERATION);
        } catch (IllegalValueException e) {
            return new CommandResult(e.getMessage());
        }
    }
}

{'fraction_non_alphanumeric': 0.08557727775728513, 'fraction_numerical': 0.005164146071560309, 'mean_word_length': 3.047761194029851, 'pattern_counts': {'":': 3, '<': 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': '2559057', 'n_tokens_mistral': 787, 'n_tokens_neox': 724, 'n_words': 201}