[Demonstration 1]

[Buggy Method]
private void await() {
    ServerSocket server = null;
    try {
        server = new ServerSocket(Cons.PORT, 1, InetAddress.getByName(Cons.HOST));
    } catch (Exception e) {
        e.printStackTrace();
        System.exit(-1);
    }
    boolean shutdown = false;
    while (!shutdown) {
        Socket socket = null;
        InputStream input = null;
        OutputStream output = null;
        try {
            socket = server.accept();
            input = socket.getInputStream();
            output = socket.getOutputStream();
            Request request = new Request(input);
            request.parse();
            Response response = new Response(output);
            response.setRequest(request);
            String uri = request.getUri();
            Processor processor = null;
            if (uri != null && Cons.SERVLET_HEAD.equals(uri)) {
                processor = new ServletProcessor(request, response);
            } else {
                processor = new StaticResourceProcessor(request, response);
            }
            processor.process();
            if (Cons.SHUTDOWN.equals(uri)) {
                shutdown = true;
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (socket != null) {
                try {
                    socket.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (input != null) {
                try {
                    input.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (output != null) {
                try {
                    output.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
    try {
        server.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
if (uri != null && Cons.SERVLET_HEAD.equals(uri)) {

[Patch]
if (uri != null && uri.endsWith(Cons.SERVLET_HEAD)) {

[Demonstration 2]

[Buggy Method]
static private boolean jj_2_8(int xla) {
    jj_la = xla;
    jj_lastpos = jj_scanpos = token;
    try {
        return !jj_3_8();
    } catch (LookaheadSuccess ls) {
        return true;
    } finally {
        jj_save(7, xla);
    }
}

[Buggy Hunk]
static private boolean jj_2_8(int xla) {

[Patch]
private boolean jj_2_8(int xla) {

[Demonstration 3]

[Buggy Method]
private static String[] getJarPaths(String jarPath) throws IOException {
    return Files.walk(Paths.get(jarPath)).map(Path::toString).filter(path -> path.endsWith(".jar")).map(path -> new File(path).getAbsolutePath()).toArray(String[]::new);
}

[Buggy Hunk]
private static String[] getJarPaths(String jarPath) throws IOException {

[Patch]
private String[] getJarPaths(String jarPath) throws IOException {