[Demonstration 1]

[Buggy Method]
public int getScrollTop() {
    return Integer.parseInt(eyesDriver.executeScript(JS_GET_SCROLL_TOP, this).toString());
}

[Buggy Hunk]
return Integer.parseInt(eyesDriver.executeScript(JS_GET_SCROLL_TOP,

[Patch]
return (int) Double.parseDouble(eyesDriver.executeScript(JS_GET_SCROLL_TOP,

[Demonstration 2]

[Buggy Method]
@RequestMapping(value = "/addparams", method = RequestMethod.GET)
@ResponseBody
public String addOps(@RequestParam("val1") String val1, @RequestParam("val2") String val2) {
    MathOperations ops = new MathOperations();
    int val1FromParameter = Integer.parseInt(val1);
    int val2FromParameter = Integer.parseInt(val1);
    Integer val = ops.addOperations(val1FromParameter, val2FromParameter).intValue();
    return val.toString();
}

[Buggy Hunk]
int val2FromParameter = Integer.parseInt(val1);

[Patch]
int val2FromParameter = Integer.parseInt(val2);

[Demonstration 3]

[Buggy Method]
public String readAddress(InputStream in) throws IOException {
    int sizeForAddress = sizeForAddress(in);
    byte[] buf;
    switch(type) {
        case IP4:
            buf = new byte[sizeForAddress];
            in.read(buf);
            return Inet4Address.getByAddress(buf).toString().substring(1);
        case IP6:
            buf = new byte[sizeForAddress];
            in.read(buf);
            return Inet6Address.getByAddress(buf).toString().substring(1);
        case TCP:
        case UDP:
        case DCCP:
        case SCTP:
            return Integer.toString((in.read() << 8) | (in.read()));
        case IPFS:
            buf = new byte[sizeForAddress];
            in.read(buf);
            return new Multihash(buf).toBase58();
        case ONION:
            byte[] host = new byte[10];
            in.read(host);
            String port = Integer.toString((in.read() << 8) | (in.read()));
            return Base32.encode(host) + ":" + port;
    }
    throw new IllegalStateException("Unimplemented protocl type: " + type.name);
}

[Buggy Hunk]
return new Multihash(buf).toBase58();

[Patch]
return Cid.cast(buf).toString();