[Demonstration 1]

[Buggy Method]
protected T handleJsonSyntaxException(T object, String json) throws IOException {
    try {
        Gson gson = new Gson();
        json = gson.toJson(json);
        MZLog.e(TAG, "new json --> " + json);
        object = adapter.fromJson(json);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return object;
}

[Buggy Hunk]
MZLog.e(TAG, "new json --> " + json);

[Patch]
Log.e(TAG, "new json --> " + json);

[Demonstration 2]

[Buggy Method]
public static Result service(String ownerName, String projectName, String service, boolean isAdvertise) throws IOException, UnsupportedOperationException, ServletException {
    if (!isSupportedService(service)) {
        return forbidden(String.format("Unsupported service: '%s'", service));
    }
    Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
    if (project == null) {
        return notFound();
    }
    models.User user = UserApp.currentUser();
    if (!isAllowed(project, service)) {
        if (user.isAnonymous()) {
            return BasicAuthAction.unauthorized(response());
        } else {
            // If you want the Git client showing your custom message to
            // the user, the Content-Type should be exact "text/plain"
            // without any parameter. For more details, see the code at
            // https://github.com/git/git/commit/426e70d4a11ce3b4f70636d57c6a0ab16ae08a00#diff-eea0ad565ec5903a11b6023755d491cfR154
            response().setHeader("Content-Type", "text/plain");
            return forbidden(String.format("'%s' has no permission to '%s/%s'.", user.name, ownerName, projectName));
        }
    }
    if (isAdvertise) {
        return ok(RepositoryService.gitAdvertise(project, service, response()));
    } else {
        if (request().body().isMaxSizeExceeded()) {
            return status(REQUEST_ENTITY_TOO_LARGE);
        } else {
            user.visits(project);
            return ok(RepositoryService.gitRpc(project, service, request(), response()));
        }
    }
}

[Buggy Hunk]
user.name, ownerName, projectName));

[Patch]
user.loginId, ownerName, projectName));

[Demonstration 3]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_review_page);
    title = (TextView) findViewById(R.id.CRtitle);
    rating = (LinearLayout) findViewById(R.id.CRrating);
    salary = (TextView) findViewById(R.id.CRsalary);
    position = (TextView) findViewById(R.id.CRposition);
    start = (TextView) findViewById(R.id.CRstart);
    end = (TextView) findViewById(R.id.CRend);
    review = (TextView) findViewById(R.id.CRbody);
    anonymous = "";
    created = (TextView) findViewById(R.id.CRcreated);
    // TODO: get info sent to fragment (comapny ID)
    Intent intent = getIntent();
    String companyRevID = intent.getStringExtra("reviewID");
    Map<String, String> revParams = new HashMap<>();
    revParams.put("job_reviewID", companyRevID);
    Kumulos.call("getCompanyReview", revParams, new ResponseHandler() {

        @Override
        public void didCompleteWithResult(Object result) {
            if (result.toString().equals("32") || result.toString().equals("64") || result.toString().equals("128")) {
                AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(act);
                alertDialogBuilder.setTitle("Error").setMessage("We were unable to retrieve information about the selected review. Try again.").setCancelable(false).setPositiveButton("Ok", new DialogInterface.OnClickListener() {

                    public void onClick(DialogInterface dialog, int id) {
                        // TODO: send them back to list of companies
                        dialog.cancel();
                    }
                });
                AlertDialog alertDialog = alertDialogBuilder.create();
                alertDialog.show();
            } else {
                ArrayList<LinkedHashMap<String, Object>> objects = (ArrayList<LinkedHashMap<String, Object>>) result;
                // TODO: go through and update all the fields
                if (objects.size() > 0) {
                    LinkedHashMap<String, Object> object = objects.get(0);
                    Log.d(TAG, object.toString());
                    title.setText(object.get("title").toString());
                    review.setText(object.get("body").toString());
                    setRating(Integer.parseInt(object.get("rating").toString()));
                    salary.setText(object.get("pay_rate").toString());
                    position.setText(object.get("job").toString());
                    start.setText(object.get("start_date").toString());
                    // TODO: dont show this if the user didnt enter it
                    end.setText(object.get("end_date").toString());
                    // TODO: if it is anonymous just print anonymous, otherwise print username
                    //anonymous.setText(object.get("anonymous").toString());
                    created.setText(object.get("timeCreated").toString());
                }
            }
        }
    });
}

[Buggy Hunk]
created.setText(object.get("timeCreated").toString());

[Patch]
created.setText(formatDate(object.get("timeCreated").toString()));