[Demonstration 1]

[Buggy Method]
public int optimize(DataHandle handle, double gsFactor, ARXListener listener) throws RollbackRequiredException {
    return optimizeFast(handle, gsFactor, Double.NaN, listener);
}

[Buggy Hunk]
return optimizeFast(handle, gsFactor, Double.NaN, listener);

[Patch]
return optimizeFast(handle, Double.NaN, gsFactor, listener);

[Demonstration 2]

[Buggy Method]
@Override
public Document retrieveConfiguration(String uuid) throws GVResourceException {
    Document document = null;
    try {
        DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        String authenticationToken = "Bearer " + authtoken;
        String projectURL = endpoint.concat("/project/").concat(uuid);
        LOG.debug("GVConfigurationRestRepository - Starting REST call to " + projectURL);
        URL restURL = new URL(projectURL);
        HttpURLConnection apiUrlConnection = (HttpURLConnection) restURL.openConnection();
        apiUrlConnection.setRequestProperty("Authorization", authenticationToken);
        apiUrlConnection.setRequestMethod("GET");
        apiUrlConnection.setRequestProperty("Accept", "application/xml");
        apiUrlConnection.setDoInput(true);
        apiUrlConnection.connect();
        int responseCode = apiUrlConnection.getResponseCode();
        LOG.debug("GVConfigurationRestRepository - Server response HTTP " + responseCode);
        switch(responseCode) {
            case HttpURLConnection.HTTP_OK:
                document = documentBuilder.parse(apiUrlConnection.getInputStream());
                apiUrlConnection.disconnect();
                break;
            case HttpURLConnection.HTTP_UNAUTHORIZED:
            case HttpURLConnection.HTTP_FORBIDDEN:
                throw new GVResourceException("Response " + responseCode + ": Authentication failure for user " + authenticationToken + " on " + projectURL, new HTTPException(responseCode));
            case HttpURLConnection.HTTP_NOT_FOUND:
                throw new GVResourceException("Response " + responseCode + ": Resource not found " + projectURL, new HTTPException(responseCode));
            default:
                throw new GVResourceException("Response " + responseCode + ": Server response error on " + projectURL, new HTTPException(responseCode));
        }
        ;
    } catch (MalformedURLException malformedURLException) {
        throw new GVResourceException("Invalid API endopoint url: " + endpoint, malformedURLException);
    } catch (ParserConfigurationException parserConfigurationException) {
        throw new GVResourceException("XML API failure ", parserConfigurationException);
    } catch (SAXException saxException) {
        throw new GVResourceException("Invalid XML response ", saxException);
    } catch (IOException ioException) {
        throw new GVResourceException("Server response error on " + endpoint, ioException);
    }
    return document;
}

[Buggy Hunk]
String authenticationToken = "Bearer " +authtoken;

[Patch]
String authenticationToken = "Bearer " + GVBusLink.getBusId();

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws SQLException {
    Connection conn = DriverManager.getConnection("jdbc:h2:./main");
    () -> {
    }.start();
    Statement stmt = conn.createStatement();
    stmt.execute("CREATE TABLE id IDENTITY, username VARCHAR, address VARCHAR, email VARCHAR");
}

[Buggy Hunk]
().start();

[Patch]
Server.createWebServer().start();