[Demonstration 1]

[Buggy Method]
public FObject put_(X x, FObject obj) {
    Number val = (Number) obj.getProperty(property);
    if (val.longValue() < 1) {
        getProperty_().set(obj, value_++);
    } else if (val.longValue() >= value_) {
        setValue(val + 1);
    }
    return getDelegate().put(obj);
}

[Buggy Hunk]
setValue(val + 1);

[Patch]
setValue(val.longValue() + 1);

[Demonstration 2]

[Buggy Method]
private String[] ConvertBinaryInfo(long index) {
    String[] data = null;
    try {
        this.InfoTemp.seek(index);
        byte len = this.InfoTemp.readByte();
        byte[] block = new byte[len];
        this.InfoTemp.read(block);
        String convert = new String(block, Charset.defaultCharset());
        return convert.split("\t");
    } catch (IOException ex) {
        log.log(Level.SEVERE, "Error reading from temp info file!", ex);
    }
    return data;
}

[Buggy Hunk]
byte[] block = new byte[len];

[Patch]
byte[] block = new byte[Byte.toUnsignedInt(len)];

[Demonstration 3]

[Buggy Method]
public static byte[] readArray(ByteBuf buf) {
    return buf.readBytes(buf.readShort()).array();
}

[Buggy Hunk]
return buf.readBytes(buf.readShort()).array();

[Patch]
return buf.array();