[Demonstration 1]

[Buggy Method]
@Override
protected void configure(HttpSecurity http) throws Exception {
    initRoutes();
    http.formLogin().loginPage(LOGIN_ROUTE).loginProcessingUrl(LOGIN_ROUTE).defaultSuccessUrl(HOME_ROUTE).failureUrl(LOGIN_ROUTE).usernameParameter(EMAIL).and().authorizeRequests().regexMatchers(GET, permitAllRoutesGET).permitAll().regexMatchers(POST, permitAllRoutesPOST).permitAll().regexMatchers(GET, anonymousRoutesGET).anonymous().regexMatchers(POST, anonymousRoutesPOST).anonymous().regexMatchers(GET, authenticatedRoutesGET).authenticated().regexMatchers(POST, authenticatedRoutesPOST).authenticated().regexMatchers(GET, tenantRoutesGET).hasRole(TENANT).regexMatchers(POST, tenantRoutesPOST).hasRole(TENANT).regexMatchers(GET, dispatcherRoutesGET).hasRole(DISPATCHER).regexMatchers(POST, dispatcherRoutesPOST).hasRole(DISPATCHER).anyRequest().denyAll().and().logout().logoutUrl(LOGOUT_ROUTE).logoutSuccessUrl(LOGIN_ROUTE).and().csrf().disable();
}

[Buggy Hunk]
.anyRequest().denyAll().and()

[Patch]
.anyRequest().permitAll().and()

[Demonstration 2]

[Buggy Method]
public Integer addEvent(String name, String description, LocalDateTime start, LocalDateTime end, EventType eventType, EventStatus status, String conductor, String location, double defaultPoints, int instrumentation) {
    EntityManager session = getCurrentSession();
    session.getTransaction().begin();
    EventDutyEntity event = new EventDutyEntity();
    event.setName(name);
    event.setDescription(description);
    event.setStarttime(start);
    event.setEndtime(end);
    event.setEventType(eventType);
    event.setEventStatus(status);
    event.setConductor(conductor);
    event.setLocation(location);
    event.setDefaultPoints(defaultPoints);
    event.setInstrumentation(instrumentation);
    session.persist(event);
    try {
        session.getTransaction().commit();
    } catch (Exception e) {
        session.getTransaction().rollback();
    }
    return event.getEventDutyId();
}

[Buggy Hunk]
EventDutyEntity event = new EventDutyEntity();

[Patch]
EventDuty event = new EventDuty();

[Demonstration 3]

[Buggy Method]
@ReactMethod
public void showUrl(String url, boolean closeOnLoad, Callback callback) {
    final Activity activity = getCurrentActivity();
    this.callback = callback;
    if (activity != null) {
        CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
        CustomTabsIntent customTabsIntent = builder.build();
        customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
        customTabsIntent.launchUrl(activity, Uri.parse(url));
    } else {
        final Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
        intent.setData(Uri.parse(url));
        getReactApplicationContext().startActivity(intent);
    }
}

[Buggy Hunk]
getReactApplicationContext().startActivity(intent);

[Patch]
getReactApplicationContext().startActivityForResult(intent, 666, new Bundle());;