[Demonstration 1]

[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 2]

[Buggy Method]
@Override
public void onClick(View view) {
    AlertDialog.Builder builder = new AlertDialog.Builder(MyListMainActivity.this);
    builder.setTitle("Choose an action").setItems(R.array.str_actionArrays, new DialogInterface.OnClickListener() {

        public void onClick(DialogInterface dialog, int which) {
            switch(which) {
                case 0:
                    //manage list
                    break;
                case 1:
                    //add items
                    startActivityForResult(new Intent(MyListMainActivity.this, MyListNewItemActivity.class), 0);
                    break;
                case 2:
                    //generate
                    //TODO radius
                    startActivity(new Intent(MyListMainActivity.this, MyListResultOfProcess.class).putExtra("ListName", spinner.getSelectedItem().toString()));
                    break;
            }
            // The 'which' argument contains the index position
            // of the selected item
        }
    });
    AlertDialog alertDialog = builder.create();
    alertDialog.show();
}

[Buggy Hunk]
startActivity(new Intent(MyListMainActivity.this,MyListResultOfProcess.class).putExtra("ListName",spinner.getSelectedItem().toString()));

[Patch]
startActivity(new Intent(MyListMainActivity.this,MyListResultOfProcessActivity.class).putExtra("ListName",spinner.getSelectedItem().toString()));

[Demonstration 3]

[Buggy Method]
private void generateData(final boolean generateRandomData) {
    new AlertDialog.Builder(DebugActivity.this).setTitle(R.string.debug_generate_random_data).setMessage(R.string.debug_generate_data_message).setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            final GenerateDataTaskParams taskParams = new GenerateDataTaskParams(historyToGenerate, generateRandomData);
            new GenerateDataTask(DebugActivity.this).execute(taskParams);
            dialog.dismiss();
        }
    }).setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            dialog.dismiss();
        }
    }).create().show();
}

[Buggy Hunk]
.setTitle(R.string.debug_generate_random_data)

[Patch]
.setTitle(generateRandomData ? R.string.debug_generate_random_data : R.string.debug_generate_full_data)