[Demonstration 1]

[Buggy Method]
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
    String path = req.getPathInfo();
    if (path.startsWith("/report/")) {
        String name = path.substring("/report/".length(), path.length());
        Optional<Class<?>> manifest = model.find(name);
        if (!manifest.isPresent()) {
            res.sendError(400, "Unknown report object: " + name);
            return;
        }
        final Optional<Object> report = Utility.objectFromQuery(manifest.get(), req.getParameterMap(), res);
        if (report.isPresent()) {
            PopulateReport.Argument<Object> arg = new PopulateReport.Argument<>(report.get(), name);
            Utility.executeJson(engine, req, res, PopulateReport.class, arg);
        }
    } else {
        res.sendError(405, "Unknown URL path: " + path);
    }
}

[Buggy Hunk]
final Optional<Object> report = Utility.objectFromQuery(manifest.get(), req.getParameterMap(), res);

[Patch]
final Optional<Object> report = Utility.objectFromQuery(manifest.get(), req, res);

[Demonstration 2]

[Buggy Method]
public static double[][] transpose(double[][] a) {
    double[][] tmp = new double[a[0].length][a.length];
    for (int j = 0; j < a[0].length; j++) for (int i = 0; i < a.length; i++) tmp[j][i] = a[i][j];
    return tmp;
}

[Buggy Hunk]
double[][] tmp = new double[a[0].length][a.length];

[Patch]
final double[][] tmp = new double[a[0].length][a.length];

[Demonstration 3]

[Buggy Method]
public StringBuffer getWebHistory() {
    return webHistory;
}

[Buggy Hunk]
public StringBuffer getWebHistory() {

[Patch]
public ArrayList<String> getWebHistory() {