[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]
@Override
public boolean isAvailable() {
    return Bukkit.getPluginManager().getPlugin("LWC") != null;
}

[Buggy Hunk]
return Bukkit.getPluginManager().getPlugin("LWC") != null;

[Patch]
return protectionGetOwnerMethod != null;

[Demonstration 3]

[Buggy Method]
public static long addFavCategory(final CategoryExpense category, final long userId) {
    final long[] id = new long[1];
    new AsyncTask<Void, Void, Void>() {

        @Override
        protected Void doInBackground(Void... params) {
            if (!favouriteCategories.containsKey(category.getName())) {
                SQLiteDatabase db = helper.getWritableDatabase();
                ContentValues values = new ContentValues();
                values.put(DbHelper.FAVCATEGORIES_COLUMN_CATEGORYNAME, category.getName());
                values.put(DbHelper.FAVCATEGORIES_COLUMN_ICON, category.getIconId());
                values.put(DbHelper.FAVCATEGORIES_COLUMN_USERFK, userId);
                id[0] = db.insert(DbHelper.TABLE_NAME_FAVCATEGORIES, null, values);
                category.setUserFk(userId);
                category.setId(id[0]);
                favouriteCategories.put(category.getId(), category);
            }
            return null;
        }
    }.execute();
    return id[0];
}

[Buggy Hunk]
if(!favouriteCategories.containsKey(category.getName())) {

[Patch]
if(!favouriteCategories.containsKey(category.getId())) {