[Demonstration 1]

[Buggy Method]
synchronized protected void downloadAssetBundle(final AssetBundle assetBundle, HttpUrl baseUrl) {
    Set<AssetBundle.Asset> missingAssets = new HashSet<AssetBundle.Asset>();
    for (AssetBundle.Asset asset : assetBundle.getOwnAssets()) {
        // Create containing directories for the asset if necessary
        File containingDirectory = asset.getFile().getParentFile();
        if (!containingDirectory.exists()) {
            if (!containingDirectory.mkdirs()) {
                didFail(new IOException("Could not create containing directory: " + containingDirectory));
                return;
            }
        }
        // If we find a cached asset, we copy it
        AssetBundle.Asset cachedAsset = cachedAssetForAsset(asset);
        if (cachedAsset != null) {
            try {
                resourceApi.copyResource(cachedAsset.getFileUri(), asset.getFileUri());
            } catch (IOException e) {
                didFail(e);
                return;
            }
        } else {
            missingAssets.add(asset);
        }
    }
    // If all assets were cached, there is no need to start a download
    if (missingAssets.isEmpty()) {
        didFinishDownloadingAssetBundle(assetBundle);
        return;
    }
    assetBundleDownloader = new AssetBundleDownloader(assetBundle, baseUrl, missingAssets);
    assetBundleDownloader.setCallback(new AssetBundleDownloader.Callback() {

        @Override
        public void onFinished() {
            assetBundleDownloader = null;
            moveDownloadedAssetBundleIntoPlace(assetBundle);
            didFinishDownloadingAssetBundle(assetBundle);
        }

        @Override
        public void onFailure(Throwable cause) {
            didFail(cause);
        }
    });
    assetBundleDownloader.resume();
}

[Buggy Hunk]
assetBundleDownloader = new AssetBundleDownloader(assetBundle, baseUrl, missingAssets);

[Patch]
assetBundleDownloader = new AssetBundleDownloader(webAppConfiguration, assetBundle, baseUrl, missingAssets);

[Demonstration 2]

[Buggy Method]
protected List<? extends Object> getPageElementsByXPath(HtmlPage page, String xPath) {
    setTestInfo("Getting page: " + page.getUrl().toString() + " ,elements by xPath: " + xPath);
    return page.getByXPath(xPath);
}

[Buggy Hunk]
protected List<? extends Object> getPageElementsByXPath(HtmlPage page, String xPath) {

[Patch]
protected List<?> getPageElementsByXPath(HtmlPage page, String xPath) {

[Demonstration 3]

[Buggy Method]
public void notifyChanged(Notification notification) {
    super.notifyChanged(notification);
    if (notification.getFeature() instanceof EAttributeImpl) {
        if (notification.getNotifier() instanceof BoundsImpl) {
            reposition(((BoundsImpl) notification.getNotifier()).getX(), ((BoundsImpl) notification.getNotifier()).getY(), ((BoundsImpl) notification.getNotifier()).getWidth(), getTreeHeight());
            FigureCanvas canvas = (FigureCanvas) getViewer().getControl();
            canvas.getViewport().repaint();
        }
    }
}

[Buggy Hunk]
getTreeHeight());

[Patch]
TreeNodeUtils.getTreeHeight(inputRootTreeNode, LEAF_HEIGHT));