[Demonstration 1]

[Buggy Method]
public String getFormattedEventEndTime(String onebrickDate) {
    try {
        final Date d = getLocalTime(dateFormat.parse(onebrickDate));
        final String time = eventTime.format(d);
        return time;
    } catch (ParseException e) {
        Log.e(TAG, "cannot parse date: " + onebrickDate);
    }
    return "";
}

[Buggy Hunk]
final Date d = getLocalTime(dateFormat.parse(onebrickDate));

[Patch]
final Date d = dateFormat.parse(onebrickDate);

[Demonstration 2]

[Buggy Method]
public static Calendar parseDividendDate(String date) {
    if (!Utils.isParseable(date)) {
        return null;
    }
    SimpleDateFormat format = new SimpleDateFormat(Utils.getDividendDateFormat(date));
    format.setTimeZone(TimeZone.getTimeZone(YahooFinance.TIMEZONE));
    try {
        Calendar today = Calendar.getInstance(TimeZone.getTimeZone(YahooFinance.TIMEZONE));
        Calendar parsedDate = Calendar.getInstance(TimeZone.getTimeZone(YahooFinance.TIMEZONE));
        parsedDate.setTime(format.parse(date));
        if (parsedDate.get(Calendar.YEAR) == 1970) {
            parsedDate.set(Calendar.YEAR, today.get(Calendar.YEAR));
        }
        return parsedDate;
    } catch (ParseException ex) {
        YahooFinance.logger.log(Level.SEVERE, ex.getMessage(), ex);
        return null;
    }
}

[Buggy Hunk]
parsedDate.setTime(format.parse(date));

[Patch]
parsedDate.setTime(format.parse(date.trim()));

[Demonstration 3]

[Buggy Method]
public void processMessage(String s) {
    if (s.contains("loggedin: ")) {
        if (!SwingUtilities.isEventDispatchThread()) {
            SwingUtilities.invokeLater(new Runnable() {

                public void run() {
                    login(s.substring(10));
                }
            });
        } else {
            login(s.substring(10));
        }
    }
    if (s.contains("chat: ")) {
        //Remove the "chat: " part and add to the chatbox
        handinfo.append(s.substring(6));
    }
    if (s.contains("stats: ")) {
        //IMO we can just dump stats in the chatbox too
        chatbox.append(s.substring(7));
    }
    if (s.contains("Your turn")) {
        try {
            //1000 milliseconds is one second.
            Thread.sleep(5000);
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
        }
        chatbox.append("It's your turn. Hit or stand?\n");
    } else {
        chatbox.append(s);
    }
    chatbox.setCaretPosition(chatbox.getText().length());
}

[Buggy Hunk]
handinfo.append(s.substring(6));

[Patch]
handinfo.append(s.substring(6) + "\n");