[Demonstration 1]

[Buggy Method]
@ApiOperation(value = "Re-query a location from an existing query. " + "This runs asynchronously and returns a query object which can later be used to get the results.")
@RequestMapping(path = "/requery/query/{queryId}/locationMap/{queryLocationMapId}", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
@ResponseBody
public Query requeryPatients(@PathVariable("queryId") Long queryId, @PathVariable("queryLocationMapId") Long queryLocationMapId) throws JsonProcessingException, IOException {
    CommonUser user = UserUtil.getCurrentUser();
    //auditManager.addAuditEntry(QueryType.SEARCH_PATIENT, "/search", user.getSubjectName());
    QueryDTO initiatedQuery = searchManager.requeryForPatientRecords(queryLocationMapId, user);
    return DtoToDomainConverter.convert(initiatedQuery);
}

[Buggy Hunk]
public @ResponseBody Query requeryPatients(@PathVariable("queryId") Long queryId,

[Patch]
public synchronized @ResponseBody Query requeryPatients(@PathVariable("queryId") Long queryId,

[Demonstration 2]

[Buggy Method]
@Override
public void onPeerJoined(Room room, List<String> strings) {
    FetchCardsTask fetchCardsTask = new FetchCardsTask(this);
    fetchCardsTask.execute(mSpinnerDeck.getSelectedItemPosition());
    mRoomId = room.getRoomId();
}

[Buggy Hunk]
fetchCardsTask.execute(mSpinnerDeck.getSelectedItemPosition());

[Patch]
fetchCardsTask.execute(mCurrentDeck);

[Demonstration 3]

[Buggy Method]
@RequestMapping(value = "/game", method = RequestMethod.GET, params = { "game" })
public ResponseEntity<?> game(@RequestParam("game") Long gameId, HttpServletRequest request, Model model) {
    try {
        Game game = getGameService().halftime(gameId);
        return new ResponseEntity<Game>(game, HttpStatus.OK);
    } catch (Exception e) {
        log.error("Problem ending game for game: " + gameId, e);
        return ResponseEntity.badRequest().body(e.getMessage());
    }
}

[Buggy Hunk]
Game game = getGameService().halftime(gameId);

[Patch]
Game game = getGameService().getGame(gameId);