[Demonstration 1]

[Buggy Method]
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    HttpServletRequest httpRequest = (HttpServletRequest) request;
    HttpServletResponse httpResponse = (HttpServletResponse) response;
    String httpMethod = httpRequest.getMethod().toLowerCase();
    String uri = httpRequest.getRequestURI();
    LOG.info("请求方法为：{}，请求路径为：{}", httpMethod, uri);
    try {
        List<RouteEntry> routeEntryList = routeMatcher.matchRoute(uri);
        if (routeEntryList.isEmpty()) {
            Grows.abort(HttpServletResponse.SC_NOT_FOUND);
        }
        RouteEntry routeEntry = routeEntryList.stream().filter((item) -> {
            return GrowsUtils.equals(item.getHttpMethod(), httpMethod);
        }).findFirst().orElseThrow(() -> {
            throw new AbortException(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "Method Not Allowed");
        });
        Request myRequest = new Request(httpRequest, routeEntry);
        Response myResponse = new Response(httpResponse);
        String responseBody = routeEntry.getRouteHandler().handle(myRequest, myResponse);
        myResponse.setResponseBody(responseBody);
        response.getWriter().write(responseBody);
    } catch (NotFoundException e) {
        handleAbortException(httpResponse, e);
    } catch (InternalServerErrorException e) {
        handleAbortException(httpResponse, e);
    } catch (AbortException e) {
        handleAbortException(httpResponse, e);
    }
}

[Buggy Hunk]
throw new AbortException(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "Method Not Allowed");

[Patch]
return new AbortException(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "Method Not Allowed");

[Demonstration 2]

[Buggy Method]
public boolean setEnrollmentLimit(int limit) {
    //If students are enrolled you can't change the enrollLimit
    if (enrolledStudents.size() == 0) {
        this.enrollLimit = limit;
        return true;
    }
    return false;
}

[Buggy Hunk]
if (enrolledStudents.size() == 0) {

[Patch]
if (enrolledStudents.size() <= limit) {

[Demonstration 3]

[Buggy Method]
public HttpRequest addBody(final String body) {
    if (this.method.equals(HTTP_METHOD.GET)) {
        LOG.error(String.format("Body is not allowed in method: %s", HTTP_METHOD.GET));
    }
    this.httpURLConnection.setDoOutput(true);
    DataOutputStream wr;
    try {
        wr = new DataOutputStream(this.httpURLConnection.getOutputStream());
        wr.writeBytes(body);
        wr.flush();
        wr.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return this;
}

[Buggy Hunk]
public HttpRequest addBody(final String body) {

[Patch]
public final HttpRequest addBody(final String body) {