[Demonstration 1]

[Buggy Method]
@Override
public Circuit init(String[] args) {
    if (inputlen != outputlen + 2)
        return error("Expecting 2 more inputs than outputs. Found " + inputlen + " input(s) and " + outputlen + " output(s).");
    if (args.length >= 1) {
        if (args[0].startsWith("$")) {
            try {
                if (args.length >= 2)
                    ramaddr = Long.decode(args[1]);
                else
                    ramaddr = 0;
                ram = (Ram) Memory.getMemory(args[0].substring(1), Ram.class);
            } catch (NumberFormatException | IOException e) {
                return error(e.getMessage());
            }
        } else
            return error("Invalid argument: " + args[0]);
    }
    register = new boolean[outputlen];
    clearRegister = new boolean[outputlen];
    if (activator != null)
        clearOutputs();
    if (ram != null) {
        ramListener = new dregisterRamListener();
        ram.addListener(ramListener);
        this.writeBits(ram.read(ramaddr));
        info("Created " + outputlen + "-bit register backed by memory: " + ram.getId() + "@" + Long.toHexString(ramaddr));
    } else
        info("Created " + outputlen + "-bit register.");
    return this;
}

[Buggy Hunk]
this.writeBits(ram.read(ramaddr));

[Patch]
this.writeBits(ram.read(ramaddr).get());

[Demonstration 2]

[Buggy Method]
public double getSolution(int i, Matrix M) {
    return (M.get(i, M.getNCol() - 1));
}

[Buggy Hunk]
public double getSolution (int i, Matrix M)

[Patch]
public Double getSolution (int i, Matrix M)

[Demonstration 3]

[Buggy Method]
private void startRoutes() {
    get("/", (req, res) -> {
        return ("Application started.");
    });
    post(ROUTE_DEVICE + "/" + DEVICE_ID + ROUTE_SENSORS + "/" + SENSOR_ID, (req, res) -> {
        final String did = req.params(DEVICE_ID);
        final String sid = req.params(SENSOR_ID);
        final String value = req.queryParams("value");
        final String timestamp = req.queryParams("timestamp");
        if ((did == null) || (sid == null) || (value == null) || (timestamp == null)) {
            log.error("A parametter is invalid: " + did + ", " + sid + ", " + value + ", " + timestamp + ".");
            return (RESPONSE_KO);
        }
        try {
            final int sensorId = Integer.parseInt(sid);
            final double sensorValue = Double.parseDouble(value);
            final long recordAt = Long.parseLong(timestamp);
            final GatewayMessage m = new GatewayMessage(sensorId, sensorValue, new Date(recordAt));
            final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").create();
            this.sendMessage(gson.toJson(m));
        } catch (final NumberFormatException e) {
            log.error("Impossible to parse a parameter: " + e.getLocalizedMessage() + ".");
            return (RESPONSE_KO);
        }
        log.info("Request success.");
        return (RESPONSE_OK);
    });
}

[Buggy Hunk]
final GatewayMessage m = new GatewayMessage(sensorId, sensorValue, new Date(recordAt));

[Patch]
final GatewayMessage m = new GatewayMessage(sensorId, sensorValue, new Date(recordAt * 1000));