[Demonstration 1]

[Buggy Method]
private void leaveCurrentGroup() {
    LayoutInflater layoutInflater = LayoutInflater.from(this);
    View promptView = layoutInflater.inflate(R.layout.group_confirm_leave, null);
    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
    alertDialogBuilder.setView(promptView).setPositiveButton("OK", new DialogInterface.OnClickListener() {

        public void onClick(DialogInterface dialog, int id) {
            //TODO: unregister self from current group
            setMainMenuGroupItemsVisibility(false);
        }
    }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

        public void onClick(DialogInterface dialog, int id) {
            dialog.cancel();
        }
    });
    AlertDialog alertD = alertDialogBuilder.create();
    alertD.show();
}

[Buggy Hunk]
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);

[Patch]
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this, R.style.NameDialogCustom);

[Demonstration 2]

[Buggy Method]
void loginSocial() {
    Integer response = NetworkManager.getInstance().loginSocial(email, socialID);
    if (response == 200) {
        Intent intent = new Intent(LoginActivity.this, MainActivity.class);
        startActivity(intent);
        LoginActivity.this.finish();
        return;
    }
    if (response == 403) {
        android.support.v7.app.AlertDialog.Builder alertDialogBuilder = new android.support.v7.app.AlertDialog.Builder(LoginActivity.this);
        alertDialogBuilder.setMessage(R.string.social_login_error);
        alertDialogBuilder.setNegativeButton("OK", new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        android.support.v7.app.AlertDialog alertDialog = alertDialogBuilder.create();
        alertDialog.show();
    } else {
        android.support.v7.app.AlertDialog.Builder alertDialogBuilder = new android.support.v7.app.AlertDialog.Builder(LoginActivity.this);
        alertDialogBuilder.setMessage(R.string.something_went_wrong);
        alertDialogBuilder.setNegativeButton("OK", new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        android.support.v7.app.AlertDialog alertDialog = alertDialogBuilder.create();
        alertDialog.show();
    }
}

[Buggy Hunk]
Integer response = NetworkManager.getInstance().loginSocial(email, socialID);

[Patch]
Integer response = NetworkManager.getInstance().loginSocial(mEmail, mSocialID);

[Demonstration 3]

[Buggy Method]
private static Element makePostRequest(String request, Map<String, String> formData) {
    System.out.println(request);
    try {
        return Jsoup.connect(request).userAgent(APIUtils.generateRandomUserAgent()).ignoreContentType(true).timeout(60 * 1000).data(formData).post().body();
    } catch (HttpStatusException e) {
        // TODO Auto-generated catch block
        if (e.getStatusCode() == 401) {
            System.out.println("A 401 exception has occured, slow down your requests and" + " double check your query parameters");
        } else if (e.getStatusCode() == 500) {
            System.out.println("A 500 exception has occured, there may have been a problem with the User Agent" + " post this issue on GitHub");
        } else {
            e.printStackTrace();
        }
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return null;
}

[Buggy Hunk]
.userAgent(APIUtils.generateRandomUserAgent())

[Patch]
.userAgent(YikYakProfile.USER_AGENT + "" + YikYakAPI.getYikYakVersion())