[Demonstration 1]

[Buggy Method]
public static void sendGetRequest(String url, String accessToken) throws XPathExpressionException, IOException {
    HttpResponse httpResponse;
    URL urlAPI = new URL(url);
    HttpURLConnection conn = (HttpURLConnection) urlAPI.openConnection();
    conn.setRequestMethod("GET");
    conn.setDoOutput(true);
    conn.setReadTimeout(10000);
    //setting headers
    conn.setRequestProperty("Authorization", "Bearer " + accessToken);
    conn.connect();
    // Get the response
    StringBuilder sb = new StringBuilder();
    BufferedReader rd = null;
    try {
        rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            sb.append(line);
        }
        httpResponse = new HttpResponse(sb.toString(), conn.getResponseCode());
        httpResponse.setResponseMessage(conn.getResponseMessage());
    } catch (IOException ignored) {
    } finally {
        if (rd != null) {
            rd.close();
        }
    }
}

[Buggy Hunk]
rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));

[Patch]
rd = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));

[Demonstration 2]

[Buggy Method]
private boolean sourceDirHasOutliers(FileSystem fs, List<Path> sourcePaths, Path destPath) throws IOException {
    long destinationModTime = fs.getFileStatus(destPath).getModificationTime();
    for (Path source : sourcePaths) {
        for (FileStatus status : fs.globStatus(new Path(source, "*"), new HiddenFilter())) {
            if (status.getModificationTime() > destinationModTime) {
                return true;
            }
        }
    }
    return false;
}

[Buggy Hunk]
long destinationModTime = fs.getFileStatus(destPath).getModificationTime();

[Patch]
long destinationModTime = CamusHourlySweeper.getDestinationModTime(fs, destPath.toString(), false);