[Demonstration 1]

[Buggy Method]
public static void downloadDb() {
    DbxClientV2 client = new DbxClientV2(config, Globals.dbxToken);
    File file = new File("sqlite.db");
    try {
        OutputStream out = new FileOutputStream(file);
        client.files().download("/sqlite.db").download(out);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
e.printStackTrace();

[Patch]
System.out.println("Invalid token");

[Demonstration 2]

[Buggy Method]
@Override
protected String doInBackground(String... f_url) {
    int count;
    try {
        for (int i = 0; i < f_url.length; i++) {
            URL url = new URL(f_url[i]);
            URLConnection conection = url.openConnection();
            conection.connect();
            //  String urlFileName = FilenameUtils.getName(f_url[i]);
            String[] pathparts = url.getPath().split("\\/");
            String filename = pathparts[pathparts.length - 1].split("\\.", 1)[0];
            int lenghtOfFile = conection.getContentLength();
            InputStream input = new BufferedInputStream(url.openStream(), 8192);
            System.out.println("Data::" + f_url[i]);
            // Output stream to write file
            OutputStream output = new FileOutputStream(new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), filename.replace("admin%2F", "").replace("%", "")));
            byte[] data = new byte[1024];
            long total = 0;
            while ((count = input.read(data)) != -1) {
                total += count;
                // publishing the progress....
                // After this onProgressUpdate will be called
                publishProgress((int) ((total * 100) / lenghtOfFile));
                // writing data to file
                output.write(data, 0, count);
            }
            output.flush();
            // closing streams
            output.close();
            input.close();
        }
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}

[Buggy Hunk]
OutputStream output = new FileOutputStream(new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), filename.replace("admin%2F","").replace("%","")));

[Patch]
OutputStream output = new FileOutputStream(new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), filename.replace("admin%2F","").replace("%20"," ").replace("%","")));

[Demonstration 3]

[Buggy Method]
@Override
public void reset(@NotNull Path path) throws IOException {
    Map<String, VcsBlobLink> committed = getCommittedFiles();
    if (!committed.containsKey(path.toString())) {
        throw new IOException("no such committed file");
    }
    String blob_name = committed.get(path.toString()).md5_hash;
    Path blob_path = Paths.get(blobs_dir_path.toString(), blob_name);
    Files.copy(blob_path, path);
}

[Buggy Hunk]
Files.copy(blob_path, path);

[Patch]
Files.copy(blob_path, path, REPLACE_EXISTING);