[Demonstration 1]

[Buggy Method]
private void uploadUserImage(HashMap<String, String> hashMap) {
    //  String filePath = Util.getPath(getActivity(), imgUri);
    if (Util.hasInternetAccess(getActivity())) {
        try {
            this.mProgressDialog = ProgressDialog.show(getActivity(), null, "Loading...", true, false);
        } catch (Exception var5) {
            var5.printStackTrace();
        }
        RequestQueue queue = MyVolley.getRequestQueue();
        Type type = new TypeToken<Register>() {
        }.getType();
        ImagePostRequest imageUploadReq = new ImagePostRequest(getActivity(), getString(R.string.URL_UPDATE_PROFILE, CvidoApplication.getAppliation().getRegister().getData().getAuthKey()), type, hashMap, "avatar", imgUri, getResources().getInteger(R.integer.profile_image_size), new Response.Listener<Register>() {

            @Override
            public void onResponse(Register response) {
                if (mProgressDialog != null && mProgressDialog.isShowing())
                    mProgressDialog.dismiss();
                if (response.getSuccess()) {
                    CvidoApplication.getAppliation().setRegister(response);
                    setProfileData(response.getData(), false);
                    imgEdit.setImageResource(R.drawable.edit);
                    llProfileUpdate.setVisibility(View.GONE);
                    Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_LONG).show();
                } else {
                    Util.showErrorBox(getActivity(), "Error", "" + response.getMessage());
                }
                Log.d("ads", "onResponse() called with: " + "response = [" + response + "]");
            }
        }, new Response.ErrorListener() {

            @Override
            public void onErrorResponse(VolleyError error) {
                if (mProgressDialog != null && mProgressDialog.isShowing())
                    mProgressDialog.dismiss();
                Log.d("", "onErrorResponse() called with: " + "error = [" + error + "]");
                Util.showErrorBox(getActivity(), "Error", "" + error.getMessage());
            }
        });
        queue.add(imageUploadReq);
    } else {
        Toast.makeText(getActivity(), getString(R.string.error_no_internet), Toast.LENGTH_LONG).show();
    }
}

[Buggy Hunk]
ImagePostRequest imageUploadReq = new ImagePostRequest(getActivity(), getString(R.string.URL_UPDATE_PROFILE, CvidoApplication.getAppliation().getRegister().getData().getAuthKey()), type, hashMap, "avatar", imgUri, getResources().getInteger(R.integer.profile_image_size), new Response.Listener<Register>() {

[Patch]
ImagePostRequest imageUploadReq = new ImagePostRequest(getActivity(), getString(AppUtill.checkForJobSeeker() ? R.string.URL_UPDATE_PROFILE : R.string.URL_UPDATE_PROFILE_EMP, CvidoApplication.getAppliation().getRegister().getData().getAuthKey()), type, hashMap, "avatar", imgUri, getResources().getInteger(R.integer.profile_image_size), new Response.Listener<Register>() {

[Demonstration 2]

[Buggy Method]
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
protected void toggleFullScreen() {
    android.util.Log.d(TAG, "toggleFullScreen");
    int flag;
    Window window = getWindow();
    if (Build.VERSION.SDK_INT < 16) {
        flag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
        if (!fullscreen) {
            window.addFlags(flag);
        } else {
            window.clearFlags(flag);
        }
    } else {
        View decorView = window.getDecorView();
        flag = decorView.getSystemUiVisibility();
        int full = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        if (!fullscreen) {
            flag |= full;
        } else {
            flag = flag & ~full;
        }
        decorView.setSystemUiVisibility(flag);
    }
    fullscreen = !fullscreen;
    showHeader(!fullscreen);
}

[Buggy Hunk]
android.util.Log.d(TAG, "toggleFullScreen");

[Patch]
Log.d(TAG, "toggleFullScreen");

[Demonstration 3]

[Buggy Method]
@EventSubscriber
public void onReady(ReadyEvent e) throws DiscordException, RateLimitException, MissingPermissionsException {
    IDiscordClient cl = main.getClient(null);
    main.logToBoth("Beginning ReadyEvent Init...");
    try {
        main.logToBoth("Attempting to change username, please wait...");
        if (IDReference.ENVIRONMENT == IDReference.RuntimeEnvironment.Live) {
            main.logToBoth("Logging in to LIVE server.");
            cl.changeUsername("Krystara");
        } else {
            main.logToBoth("Logging in to TESTING server.");
            cl.changeUsername("Krystara *Testing*");
        }
        main.logToBoth("Changing image...");
        cl.changeAvatar(Image.forUrl("png", "http://repo.samboycoding.me/static/krystarabot_icon.png"));
    } catch (DiscordException ex) {
        main.logToBoth("Failed to change username. Rate limited most likely. Message: " + ex.getMessage());
    }
    try {
        main.logToBoth("Setting status...");
        cl.changeStatus(Status.game("?help"));
        main.logToBoth("My ID: " + main.getClient(null).getApplicationClientID());
        IDReference.MYID = main.getClient(null).getApplicationClientID();
        main.logToBoth("Registering commands...");
        main.registerCommand(new BanCommand());
        main.registerCommand(new BuildcacheCommand());
        main.registerCommand(new ClassCommand());
        main.registerCommand(new ClearCommand());
        main.registerCommand(new ClearcacheCommand());
        main.registerCommand(new ReigsterCodeCommand());
        //main.registerCommand(new CodesCommand());
        //main.registerCommand(new DeadCommand());
        main.registerCommand(new HelpCommand());
        main.registerCommand(new KickCommand());
        main.registerCommand(new KingdomCommand());
        main.registerCommand(new ListQuestionsCommand());
        main.registerCommand(new NewcodeCommand());
        main.registerCommand(new PingCommand());
        main.registerCommand(new PlatformCommand());
        main.registerCommand(new QuestionCommand());
        main.registerCommand(new QuizCommand());
        main.registerCommand(new ReloadDataCommand());
        main.registerCommand(new SearchCommand());
        main.registerCommand(new ServerstatsCommand());
        main.registerCommand(new SpellCommand());
        main.registerCommand(new StopQuizCommand());
        main.registerCommand(new TeamCommand());
        main.registerCommand(new Top10Command());
        main.registerCommand(new TraitCommand());
        main.registerCommand(new TraitstoneCommand());
        main.registerCommand(new TroopCommand());
        main.registerCommand(new UserstatsCommand());
        main.registerCommand(new WarnCommand());
        main.registerCommand(new WeaponCommand());
        String timestamp = "";
        Calendar now = main.getNow();
        timestamp += now.get(Calendar.DATE) + " of ";
        timestamp += new DateFormatSymbols().getMonths()[now.get(Calendar.MONTH)];
        timestamp += " " + now.get(Calendar.YEAR) + " at ";
        timestamp += main.getTimestamp("hh:mm:ss") + ".";
        EmbedObject o = new EmbedBuilder().withAuthorName("KrystaraBot").withAuthorIcon("http://repo.samboycoding.me/static/krystarabot_icon.png").withColor(Color.green).withDesc("Bot started on " + timestamp).withTitle("Hello, world!").build();
        e.getClient().getGuildByID(IDReference.SERVERID).getChannelByID(IDReference.LOGSCHANNEL).sendMessage("", o, false);
        main.logToBoth("Finished processing readyEvent. Bot is 100% up now.\n\n");
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}

[Buggy Hunk]
if (IDReference.ENVIRONMENT == IDReference.RuntimeEnvironment.Live)

[Patch]
if (IDReference.ENVIRONMENT == IDReference.RuntimeEnvironment.LIVE)