[Demonstration 1]

[Buggy Method]
@CrossOrigin
@RequestMapping(method = RequestMethod.POST, value = "/detailStore/{id}", produces = "application/json; charset=utf-8")
public ResponseEntity<HashMap<String, Serializable>> detailStore(@PathVariable(name = "id") String storeId, @RequestParam String auth) throws AuthException, AuthExpiredException, NoUserException, RoleException {
    Authenticator.Session session = authenticator.validate(auth);
    User user = session.getUser();
    Store store = storeRepo.findOne(storeId);
    if (store == null) {
        Logger.info(session.getUsername(), "store not found with id = " + storeId);
        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
    }
    if (store.getUser() != user && !authenticator.isAdmin(user.getUsername())) {
        throw new RoleException();
    }
    HashMap result = store.toMoreDetailedParamsMap();
    result.put("checkout", accountHistoryRepo.sumCheckoutAmountByStore(storeId));
    return new ResponseEntity<>(result, HttpStatus.OK);
}

[Buggy Hunk]
if (store.getUser() != user && !authenticator.isAdmin(user.getUsername())) {

[Patch]
if (!Objects.equals(store.getUser().getId(), user.getId()) && !authenticator.isAdmin(user.getUsername())) {

[Demonstration 2]

[Buggy Method]
public String GetPageContent(String url) throws Exception {
    return GetPageContent(url, true);
}

[Buggy Hunk]
public String GetPageContent(String url) throws Exception {

[Patch]
public HtmlPage GetPageContent(String url) throws Exception {

[Demonstration 3]

[Buggy Method]
public void run() {
    AlertDialog.Builder builder = new AlertDialog.Builder(Main.this);
    builder.setTitle(R.string.error_loginError);
    builder.setMessage(R.string.error_userNotFound).setCancelable(false).setPositiveButton("OK", new DialogInterface.OnClickListener() {

        public void onClick(DialogInterface dialog, int id) {
        }
    });
    AlertDialog alert = builder.create();
    alert.show();
}

[Buggy Hunk]
builder.setMessage(R.string.error_userNotFound)

[Patch]
builder.setMessage("Hiba!")