[Demonstration 1]

[Buggy Method]
private String addLineBreaks(String text) {
    if (text.substring(0, 2).equalsIgnoreCase("\\p")) {
        text = text.substring(2);
    }
    text = text.replace("\\b", "<br/><br/>");
    String sRegex = "\\\\pi\\d*";
    text = text.replaceAll(sRegex, "<br/>" + TAB);
    text = text.replace("\\p", "<br/>" + TAB);
    return text;
}

[Buggy Hunk]
text = text.replace("\\p", "<br/>" + TAB);

[Patch]
text = text.replace("\\p", "<br/>");

[Demonstration 2]

[Buggy Method]
public static String toUpperFirstLetter(String text) {
    return text.substring(0, 1).toUpperCase() + text.substring(1);
}

[Buggy Hunk]
public static String toUpperFirstLetter(String text) {

[Patch]
static String toUpperFirstLetter(String text) {

[Demonstration 3]

[Buggy Method]
public int chooseDec(String s) {
    try {
        return HEXDIGITS.indexOf(s);
    } catch (Exception ex) {
        System.out.println("ERROR: Index out of range.");
        return -1;
    }
}

[Buggy Hunk]
public int chooseDec(String s) {

[Patch]
public static int chooseDec(String s) {