[Demonstration 1]

[Buggy Method]
private void addTrapBoundary(Unit unit, Trap t, Map<Unit, List<Trap>> unitToTrapBoundaries) {
    List<Trap> boundary = unitToTrapBoundaries.get(t.getBeginUnit());
    if (boundary == null) {
        boundary = new ArrayList<Trap>();
        unitToTrapBoundaries.put(unit, boundary);
    }
    boundary.add(t);
}

[Buggy Hunk]
List<Trap> boundary = unitToTrapBoundaries.get(t.getBeginUnit());

[Patch]
List<Trap> boundary = unitToTrapBoundaries.get(unit);

[Demonstration 2]

[Buggy Method]
public List<BerRealString> getBerVisibleString() {
    if (seqOf == null) {
        seqOf = new ArrayList<>();
    }
    return seqOf;
}

[Buggy Hunk]
public List<BerRealString> getBerVisibleString() {

[Patch]
public List<BerVisibleString> getBerVisibleString() {

[Demonstration 3]

[Buggy Method]
private static String readBodyAsString(ListIterator<String> iterator, String boundary) {
    StringBuilder textBody = new StringBuilder();
    // Parse as plain text.
    while (iterator.hasNext()) {
        String line = iterator.next();
        if (boundary != null && line.startsWith(boundary)) {
            // end of section.
            return textBody.toString();
        } else {
            // Check for IMAP command stream delimiter.
            if (isEndOfMessage(iterator, line, boundary))
                return textBody.toString();
        }
        textBody.append(line).append("\r\n");
    }
    return textBody.toString();
}

[Buggy Hunk]
if (boundary != null && line.startsWith(boundary)) {

[Patch]
if (boundary != null && Parsing.startsWithIgnoreCase(line, boundary)) {