[Demonstration 1]

[Buggy Method]
private void startGui() {
    String serverUrl = serverUrlInput.getText();
    JacksonFeature jacksonFeature = new JacksonFeature();
    ClientConfig cc = new ClientConfig().register(jacksonFeature);
    Client client = ClientBuilder.newClient(cc);
    client.register(GZipEncoder.class);
    client.register(EncodingFilter.class);
    client.register(DeflateEncoder.class);
    if (!Strings.isNullOrEmpty(httpAuthenticationUser) && !Strings.isNullOrEmpty(httpAuthenticationUser)) {
        client.register(HttpAuthenticationFeature.basic(httpAuthenticationUser, httpAuthenticationPassword));
    }
    progress.setProgress(-1);
    File guiFolder = new File("./" + serverUrl.hashCode());
    String fileHash = "";
    if (guiFolder.exists()) {
        try {
            fileHash = Files.hash(new File(guiFolder, GUI_ZIP), Hashing.md5()).toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();
    provider.setMapper(new ObjectMapper());
    client.register(provider);
    WebTarget webResource = client.target(serverUrl + "/download/checkVersion?" + "fileHash=" + fileHash);
    Response response = webResource.request(MediaType.TEXT_PLAIN).get();
    boolean needUpdate = Boolean.parseBoolean(response.readEntity(String.class));
    rootPane.setDisable(true);
    new Thread() {

        @Override
        public void run() {
            try {
                if (needUpdate) {
                    WebTarget webResourceDownload = client.target(serverUrl + "/download/");
                    Response responseDownload = webResourceDownload.request("application/zip").get();
                    File tempDownloadFile = responseDownload.readEntity(File.class);
                    File newFile = new File(guiFolder, GUI_ZIP);
                    mkdir(guiFolder);
                    Files.move(tempDownloadFile, newFile);
                    unzip(newFile.getAbsolutePath(), newFile.getParent());
                }
                URL distributionServerURL = new URL(serverUrl);
                new ProcessBuilder(guiFolder.getAbsolutePath() + "/project.exe", distributionServerURL.toExternalForm()).directory(new File(guiFolder.getAbsolutePath(), "./")).inheritIO().start();
                if (!serverUrlList.getItems().contains(serverUrl)) {
                    serverUrlList.getItems().add(serverUrl);
                }
                writeServerList();
                Platform.runLater(() -> {
                    progress.setProgress(1);
                    rootPane.setDisable(false);
                });
            } catch (IOException e) {
                Platform.runLater(() -> rootPane.setDisable(false));
                throw new RuntimeException(e);
            }
        }
    }.start();
}

[Buggy Hunk]
if (!Strings.isNullOrEmpty(httpAuthenticationUser) && !Strings.isNullOrEmpty(httpAuthenticationUser) ){

[Patch]
if (!Strings.isNullOrEmpty(httpAuthenticationUser) && !Strings.isNullOrEmpty(httpAuthenticationPassword) ){

[Demonstration 2]

[Buggy Method]
public static <A> A[] castArray(Object[] os) {
    A a = firstNonNull((A[]) os);
    return a == null ? (A[]) os : castArray(os, (Class<A>) a.getClass());
}

[Buggy Hunk]
A a = firstNonNull((A[]) os);

[Patch]
A a = firstNonNull((A[]) os).get();

[Demonstration 3]

[Buggy Method]
@Override
public String toString() {
    final StringBuilder builder = new StringBuilder();
    builder.append(getName()).append(" = ");
    // TODO threadlocal model
    builder.append(getLinkage().getIrString()).append(' ');
    // TODO calling convention
    builder.append(getIRKeyword()).append(' ');
    builder.append(((PointerType) getType()).getPointeeType().toString());
    if (getValue() != null) {
        builder.append(' ').append(getValue().toString());
    }
    if (getAlign() > 0) {
        builder.append(", align").append(align);
    }
    return builder.toString();
}

[Buggy Hunk]
builder.append(", align").append(align);

[Patch]
builder.append(String.format(", align %d", align));