[Demonstration 1]

[Buggy Method]
private boolean displayPage(String name) {
    PyCode code = null;
    try {
        code = host.getPage(name);
    } catch (IOException e) {
        Spark.halt(501);
    }
    if (code == null)
        return false;
    PyDictionary globals = new PyDictionary();
    globals.put("page", this);
    globals.put("templates", host.getTemplates());
    globals.put("database", host.getDatabase());
    globals.put("model", model);
    response.type(CONTENT_TYPE[0]);
    try {
        code.call(new PyFrame((PyBaseCode) code, globals));
    } catch (Exception e) {
        print(StringEscapeUtils.escapeHtml4(e.toString()));
        e.printStackTrace();
    }
    return true;
}

[Buggy Hunk]
response.type(CONTENT_TYPE[0]);

[Patch]
response.type("text/html");

[Demonstration 2]

[Buggy Method]
public static RouteSelector get(Request request, OkHttpClient client) throws IOException {
    String uriHost = request.url().getHost();
    if (uriHost == null || uriHost.length() == 0) {
        throw new UnknownHostException(request.url().toString());
    }
    SSLSocketFactory sslSocketFactory = null;
    HostnameVerifier hostnameVerifier = null;
    CertificatePinner certificatePinner = null;
    if (request.isHttps()) {
        sslSocketFactory = client.getSslSocketFactory();
        hostnameVerifier = client.getHostnameVerifier();
        certificatePinner = client.getCertificatePinner();
    }
    Address address = new Address(uriHost, getEffectivePort(request.url()), client.getSocketFactory(), sslSocketFactory, hostnameVerifier, certificatePinner, client.getAuthenticator(), client.getProxy(), client.getProtocols(), client.getConnectionSpecs());
    return new RouteSelector(address, request.uri(), client, request);
}

[Buggy Hunk]
client.getConnectionSpecs());

[Patch]
client.getConnectionSpecs(), client.getProxySelector());

[Demonstration 3]

[Buggy Method]
private boolean disconnect() {
    if (client.disconnect()) {
        return true;
    }
    return false;
}

[Buggy Hunk]
if (client.disconnect()) {

[Patch]
if (mService.getTelnet().disconnect()) {