[Demonstration 1]

[Buggy Method]
public void printConsole(String text, Color textColor, Color bgColor, int fontStyle, int size) {
    this.console.print(text, textColor, bgColor, fontStyle, size);
}

[Buggy Hunk]
public void printConsole (String text, Color textColor, Color bgColor, int fontStyle, int size) {

[Patch]
public void printConsole (final String text, final Color textColor, final Color bgColor, final int fontStyle, final int size) {

[Demonstration 2]

[Buggy Method]
public void onFailure(final FunctionContext context) {
    if (context.isForbidden()) {
        Console.error(failureMessage, Console.CONSTANTS.unauthorized_desc());
    } else {
        //noinspection ThrowableResultOfMethodCallIgnored
        String details = context.getError() != null ? context.getError().getMessage() : null;
        Console.error(failureMessage, details);
    }
    loadAssignments();
}

[Buggy Hunk]
Console.error(failureMessage, Console.CONSTANTS.unauthorized_desc());

[Patch]
Console.error(failureMessage, Console.CONSTANTS.forbidden_desc());

[Demonstration 3]

[Buggy Method]
@Override
public void update(int dt) {
    selectedButton = Button.update(buttons, selectedButton);
    InputControl input = InputControl.instance();
    switch(state) {
        case POKEDEX:
            if (input.consumeIfDown(ControlKey.SPACE)) {
                if (!displayInfo) {
                    displayInfo = true;
                } else {
                    message = null;
                }
            }
            if (message == null) {
                setState(State.NICKNAME_QUESTION);
            }
            break;
        case NICKNAME_QUESTION:
            if (rightButton().checkConsumePress()) {
                setState(State.LOCATION);
            }
            if (leftButton().checkConsumePress()) {
                setState(State.NICKNAME);
            }
            break;
        case NICKNAME:
            if (!input.isCapturingText()) {
                input.startTextCapture();
            }
            if (input.consumeIfDown(ControlKey.ENTER)) {
                input.stopTextCapture();
                String nickname = input.getCapturedText(ActivePokemon.MAX_NAME_LENGTH);
                newPokemon.setNickname(nickname);
                setState(State.LOCATION);
            }
            break;
        case LOCATION:
            if (rightButton().checkConsumePress()) {
                setState(State.END);
            }
            if (leftButton().checkConsumePress()) {
                setState(State.PARTY_SELECTION);
            }
            break;
        case PARTY_SELECTION:
            if (input.consumeIfDown(ControlKey.BACK)) {
                setState(State.END);
            }
            CharacterData player = Game.getPlayer();
            List<ActivePokemon> party = player.getTeam();
            for (int row = 0; row < 2; row++) {
                for (int col = 0; col < Trainer.MAX_POKEMON / 2; col++) {
                    int buttonIndex = Point.getIndex(col, row, NUM_COLS);
                    int partyIndex = Point.getIndex(col, row, Trainer.MAX_POKEMON / 2);
                    Button pokemonButton = buttons[buttonIndex];
                    if (pokemonButton.checkConsumePress()) {
                        ActivePokemon newPokemon = this.newPokemon;
                        this.newPokemon = party.get(partyIndex);
                        player.getPC().switchPokemon(newPokemon, partyIndex);
                        setState(State.END);
                        break;
                    }
                }
            }
            break;
        case END:
            if (input.consumeIfDown(ControlKey.SPACE)) {
                message = null;
            }
            if (message == null) {
                Game.instance().popView();
            }
            break;
    }
}

[Buggy Hunk]
Game.instance().popView();

[Patch]
Game.instance().setViewMode(ViewMode.MAP_VIEW);