[Demonstration 1]

[Buggy Method]
private static final TaggedToken convert(edu.jhu.hlt.concrete.TaggedToken tt) {
    TaggedToken.Builder b = new TaggedToken.Builder();
    b.setIndex(tt.getTokenIndex());
    b.setTag(tt.getTag());
    return b.build();
}

[Buggy Hunk]
b.setIndex(tt.getTokenIndex());

[Patch]
b.setIndex(new IntZeroOrGreater.Builder().setVal(tt.getTokenIndex()).build());

[Demonstration 2]

[Buggy Method]
final boolean isProjection(final Integer code) throws SQLException {
    Boolean projection = isProjection.get(code);
    if (projection == null) {
        try (ResultSet result = executeQuery("isProjection", "SELECT COORD_REF_SYS_CODE" + " FROM [Coordinate Reference System]" + " WHERE PROJECTION_CONV_CODE = ?" + " AND COORD_REF_SYS_KIND LIKE 'projected%'", code)) {
            projection = result.next();
        }
        isProjection.put(code, projection);
    }
    return projection;
}

[Buggy Hunk]
" AND COORD_REF_SYS_KIND LIKE 'projected%'", code))

[Patch]
" AND CAST(COORD_REF_SYS_KIND AS " + TableInfo.ENUM_REPLACEMENT + ") LIKE 'projected%'", code))

[Demonstration 3]

[Buggy Method]
@Override
public void close() throws IOException {
    if (closed) {
        return;
    }
    if (lineConversionMode) {
        byte[] bytes = conversionBuffer.toByteArray();
        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
        for (int i = 0; i < bytes.length; i++) {
            if (bytes[i] != (byte) '\r') {
                buffer.write((int) bytes[i]);
            } else {
                additionalBytes -= 1L;
            }
        }
        if (bytes[bytes.length - 1] != (byte) '\n') {
            additionalBytes += 1L;
            buffer.write((int) bytes[bytes.length - 1]);
        }
        super.write(buffer.toByteArray());
    } else {
        if (needsChecking && probablyNeedsFixing) {
            if (EOL.length() == 2) {
                super.write(new byte[] { (byte) '\r', (byte) '\n' }, 0, 2);
                additionalBytes = 2L;
            } else {
                super.write(new byte[] { (byte) '\n' }, 0, 1);
                additionalBytes = 1L;
            }
        }
    }
    closed = true;
    super.close();
}

[Buggy Hunk]
buffer.write((int) bytes[bytes.length - 1]);

[Patch]
buffer.write((int) '\n');