[Demonstration 1]

[Buggy Method]
@Test
public void doFilterWhenAuthorizationCodeErrorResponseThenAuthenticationFailureHandlerIsCalled() throws Exception {
    ClientRegistration clientRegistration = TestUtil.githubClientRegistration();
    AuthorizationCodeAuthenticationFilter filter = Mockito.spy(setupFilter(clientRegistration));
    AuthenticationFailureHandler failureHandler = mock(AuthenticationFailureHandler.class);
    filter.setAuthenticationFailureHandler(failureHandler);
    MockHttpServletRequest request = this.setupRequest(clientRegistration);
    String errorCode = OAuth2Error.INVALID_GRANT_ERROR_CODE;
    request.addParameter(OAuth2Parameter.ERROR, errorCode);
    request.addParameter(OAuth2Parameter.STATE, "some state");
    MockHttpServletResponse response = new MockHttpServletResponse();
    FilterChain filterChain = mock(FilterChain.class);
    filter.doFilter(request, response, filterChain);
    Mockito.verify(filter).attemptAuthentication(Matchers.any(HttpServletRequest.class), Matchers.any(HttpServletResponse.class));
    Mockito.verify(failureHandler).onAuthenticationFailure(Matchers.any(HttpServletRequest.class), Matchers.any(HttpServletResponse.class), Matchers.any(AuthenticationException.class));
}

[Buggy Hunk]
String errorCode = OAuth2Error.INVALID_GRANT_ERROR_CODE;

[Patch]
String errorCode = OAuth2ErrorCode.INVALID_GRANT;

[Demonstration 2]

[Buggy Method]
public void startTracking(List<Integer> landmarkIds, float landmarkSize) throws InterruptedException, CallError {
    System.out.println("Start tracking landmark " + landmarkIds);
    tracker.unregisterAllTargets();
    List<Object> mark = new ArrayList<>();
    mark.add(landmarkSize);
    mark.add(landmarkIds);
    tracker.registerTarget("LandMark", mark);
    List<Float> position = new ArrayList<>();
    position.add(distance);
    position.add(0f);
    position.add(0f);
    position.add(tolerance);
    position.add(tolerance);
    position.add(tolerance);
    if (!tracker.isSearchEnabled()) {
        tracker.toggleSearch(true);
    }
    tracker.setMode("Move");
    tracker.setRelativePosition(position);
    tracker.track("LandMark");
}

[Buggy Hunk]
position.add(distance);

[Patch]
position.add(-1 * distance);

[Demonstration 3]

[Buggy Method]
@Test
public void singleQueryRosa() {
    ArrayList<String> keywords = new ArrayList<String>();
    keywords.add("Hexelschneider");
    ResultList resultList = PartnerRecommenderTestHelper.getRecommendations(DEPLOYMENT_CONTEXT, port, PartnerRecommenderTestHelper.createParamsForPartnerRecommender(20, keywords));
    assertNotNull(resultList);
    assertTrue(resultList.results.size() > 0);
    assertEquals(20, resultList.results.size());
}

[Buggy Hunk]
assertEquals(20, resultList.results.size());

[Patch]
assertEquals(8, resultList.results.size());