[Demonstration 1]

[Buggy Method]
@Override
public UpdateContextResponse updateContext(final UpdateContext update) throws TypeNotFoundException {
    logger.debug("updateContext incoming request: {}", update.toString());
    List<ContextElementResponse> responses = new LinkedList<>();
    for (ContextElement element : update.getContextElements()) {
        StatusCode statusCode;
        try {
            Event event = eventMapper.eventFromContextElement(element);
            complexEventProcessor.processEvent(event);
            statusCode = new StatusCode(CodeEnum.CODE_200);
        } catch (EventProcessingException e) {
            logger.error("updateContext incoming request: failed to process event {}", e);
            statusCode = new StatusCode(CodeEnum.CODE_472);
            statusCode.setDetail(e.getMessage());
        }
        responses.add(new ContextElementResponse(element, statusCode));
    }
    UpdateContextResponse response = new UpdateContextResponse();
    response.setContextElementResponses(responses);
    return response;
}

[Buggy Hunk]
statusCode = new StatusCode(CodeEnum.CODE_472);

[Patch]
statusCode = new StatusCode(CodeEnum.CODE_472, "");

[Demonstration 2]

[Buggy Method]
protected void setBeanObjects(Map<String, Object> beanObjects) {
    this.beanObjects = beanObjects;
}

[Buggy Hunk]
protected void setBeanObjects(Map<String, Object> beanObjects) {

[Patch]
public void setBeanObjects(Map<String, Object> beanObjects) {

[Demonstration 3]

[Buggy Method]
public void show(Action action, Game game) {
    try {
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(getClass().getResource("GameProperties.fxml"));
        AnchorPane pane = (AnchorPane) loader.load();
        if (!action.equals(Action.VIEW)) {
            game = new GameDao().findGameWithDetails(game.getIdNo());
        }
        GamePropertiesController controller = (GamePropertiesController) loader.getController();
        controller.setCurrentAction(action);
        controller.setGame(game);
        controller.init();
        MainLayout.getRootLayout().setCenter(pane);
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
if(!action.equals(Action.VIEW)){

[Patch]
if(action.equals(Action.EDIT)){