[Demonstration 1]

[Buggy Method]
private void initializeWebView() {
    runOnFxApplicationThread(() -> {
        // initialize webView and associated variables
        webView = new WebView();
        webView.setContextMenuEnabled(false);
        WebEngine webEngine = webView.getEngine();
        webEngine.setJavaScriptEnabled(true);
        // useful for debugging
        webEngine.setOnAlert(event -> {
            LOGGER.info(event.getData());
        });
        webEngine.getLoadWorker().stateProperty().addListener((observable, oldValue, newValue) -> {
            if (newValue == SUCCEEDED) {
                if (new IsBlankImage().test(screenCapture())) {
                    webEngine.loadContent(buildContent());
                }
                topsoil = (JSObject) webEngine.executeScript("topsoil");
                topsoil.setMember("bridge", new Bridge());
                if (getProperties() != null) {
                    topsoil.call("setProperties", getProperties());
                }
                if (getData() != null) {
                    topsoil.call("setData", getData());
                }
                loadFuture.complete(null);
            }
        });
        // asynchronous
        webEngine.loadContent(buildContent());
    });
}

[Buggy Hunk]
topsoil.setMember("bridge", new Bridge());

[Patch]
topsoil.setMember("bridge", bridge);

[Demonstration 2]

[Buggy Method]
private void ensureNoColorModeYet() {
    if (this.phLightState.getColorMode() != null) {
        throw new IllegalStateException("Cannot set the color mode twice.");
    }
}

[Buggy Hunk]
if (this.phLightState.getColorMode() != null) {

[Patch]
if (this.phLightState.getColorMode() != PHLightColorMode.COLORMODE_UNKNOWN) {

[Demonstration 3]

[Buggy Method]
public static List<String> getAllObjectsContainedInObject(GameWorld world, String parentID) {
    List<String> allContainedObjects = new ArrayList<String>();
    List<String> objChildren = world.getChildren(parentID);
    for (String childID : objChildren) {
        GameObject child = world.getGameObject(childID);
        if (GameUtils.objectIsInScope(world, child)) {
            List<String> childsChildren = getAllObjectsContainedInObject(world, childID);
            if (childsChildren != null)
                allContainedObjects.addAll(childsChildren);
            allContainedObjects.add(childID);
        }
    }
    return allContainedObjects;
}

[Buggy Hunk]
if (GameUtils.objectIsInScope(world, child))

[Patch]
if (GameUtils.objectIsInScope(world, child) && !(child instanceof Direction))