[Demonstration 1]

[Buggy Method]
private Alarm select(String column, long id) {
    Cursor cursor = select(null, column, new String[] { Long.toString(id) }, null, null, null);
    AlarmCursorWrapper wrapper = new AlarmCursorWrapper(cursor);
    if (wrapper.moveToFirst()) {
        return wrapper.getAlarm();
    } else {
        throw new SQLException("Failed to select Alarm with id " + id);
    }
}

[Buggy Hunk]
Cursor cursor = select(null, column, new String[]{Long.toString(id)},

[Patch]
Cursor cursor = select(null, column + "=?", new String[]{Long.toString(id)},

[Demonstration 2]

[Buggy Method]
public static void printCard(int card) {
    if (card < 11) {
        System.out.println(" " + a);
    } else if (card == 11) {
        System.out.println(" Jack");
    } else if (card == 12) {
        System.out.println(" Queen");
    } else if (card == 13) {
        System.out.println(" King");
    } else if (card == 14) {
        System.out.println(" Ace");
    }
}

[Buggy Hunk]
System.out.println(" " + a);

[Patch]
System.out.println(" " + card);

[Demonstration 3]

[Buggy Method]
@SuppressWarnings("unchecked")
private Message getCommandHelp(String command) {
    try {
        System.out.println("In CommandHelp!");
        String[] callCommandHelp = { "command", "指令" };
        if (command.startsWith("!") || command.startsWith("！")) {
            String key = command.split(" ")[0].substring(1);
            String target = command.substring(key.length() + 1).trim();
            System.out.println("key = " + key);
            System.out.println("target = " + target);
            if (Arrays.asList(callCommandHelp).contains(key)) {
                System.out.println("StringUtils.isEmpty(target) = " + StringUtils.isEmpty(target));
                if (StringUtils.isEmpty(target)) {
                    List<Action> actions = new ArrayList<>();
                    for (CommandHelp commandHelp : CommandHelp.values()) {
                        String actionCommand = "!command ".concat(commandHelp.toString());
                        actions.add(new PostbackAction(commandHelp.chineseCommand, actionCommand, "說說關於" + commandHelp.chineseCommand + "的內容吧 (ﾟ∀ﾟ )"));
                    }
                    String imgpath = null;
                    String title = "草泥馬指令助手";
                    String text = "想知道什麼呢（·´ｪ`·）?";
                    ButtonsTemplate buttonsTemplate = new ButtonsTemplate(imgpath, title, text, actions);
                    return new TemplateMessage(title, buttonsTemplate);
                } else {
                    CommandHelp commandHelp = CommandHelp.getCommandHelp(target);
                    System.out.println(commandHelp);
                    if (commandHelp != null) {
                        Field field = this.getClass().getField(commandHelp.toString());
                        StringBuffer sb = new StringBuffer();
                        sb.append(commandHelp.chineseCommand + Change_Line);
                        sb.append(commandHelp.description + Change_Line);
                        for (String commandKey : ((HashMap<String, Object>) field.get(this)).keySet()) {
                            sb.append(commandKey + Change_Line);
                        }
                        System.out.println(sb.toString());
                        return new TextMessage(sb.toString());
                    }
                }
            }
        }
    } catch (NoSuchFieldException e) {
        e.printStackTrace();
    } catch (SecurityException e) {
        e.printStackTrace();
    } catch (IllegalArgumentException e) {
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        e.printStackTrace();
    }
    return null;
}

[Buggy Hunk]
Field field= this.getClass().getField(commandHelp.toString());

[Patch]
Field field= this.getClass().getDeclaredField(commandHelp.toString());