[Demonstration 1]

[Buggy Method]
private boolean handleEndTouchEvent(@NonNull final MotionEvent event, final int x) {
    if ((undo && currentTouchView != null) || (isSwipeable(currentTouchView) && !((ViewConfiguration.getTapTimeout() < (event.getEventTime() - event.getDownTime())) || (ViewConfiguration.get(getContext()).getScaledTouchSlop() < getDistanceTo(event))))) {
        updateParams(currentTouchView, 0);
        if (undo && !moved) {
            ((Button) currentTouchView.findViewById(R.id.undo)).callOnClick();
        } else {
            currentTouchView.onTouchEvent(event);
        }
        currentTouchView = null;
        return true;
    }
    synchronized (this) {
        resetThread = new Thread(new Runnable() {

            @Override
            public void run() {
                try {
                    Thread.sleep(100L);
                } catch (final InterruptedException ignored) {
                    return;
                }
                synchronized (SwipeLinearLayout.this) {
                    if (moved && (resetThread != null) && !resetThread.isInterrupted() && (currentTouchView != null) && !isRemoving) {
                        currentTouchView.post(new Runnable() {

                            @Override
                            public void run() {
                                animateView((int) (x - xDown), 300L, new DecelerateInterpolator(), new ValueAnimator.AnimatorUpdateListener() {

                                    @Override
                                    public void onAnimationUpdate(final ValueAnimator animation) {
                                        updateParams(currentTouchView, (Integer) animation.getAnimatedValue());
                                    }
                                }, new EndMoveAnimatorListener(new AnimationEnd() {

                                    @Override
                                    public void onAnimationEnd(@NonNull final Animator animation) {
                                        currentTouchView = null;
                                        if (getParent() != null) {
                                            getParent().requestDisallowInterceptTouchEvent(false);
                                        }
                                    }
                                }));
                            }
                        });
                        resetThread = null;
                    }
                }
            }
        });
        resetThread.start();
    }
    return false;
}

[Buggy Hunk]
((Button)currentTouchView.findViewById(R.id.undo)).callOnClick();

[Patch]
((Button) currentTouchView.findViewById(R.id.undo)).performClick();

[Demonstration 2]

[Buggy Method]
public OWLDataFactory getDataFactory() {
    return m_rootOntology.getOWLOntologyManager().getOWLDataFactory();
}

[Buggy Hunk]
return m_rootOntology.getOWLOntologyManager().getOWLDataFactory();

[Patch]
return df;

[Demonstration 3]

[Buggy Method]
public static Result service(String ownerName, String projectName, String service, boolean isAdvertise) throws IOException, UnsupportedOperationException, ServletException {
    if (!isSupportedService(service)) {
        return forbidden(String.format("Unsupported service: '%s'", service));
    }
    Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
    if (project == null) {
        return notFound();
    }
    models.User user = UserApp.currentUser();
    if (!isAllowed(project, service)) {
        if (user.isAnonymous()) {
            return BasicAuthAction.unauthorized(response());
        } else {
            // If you want the Git client showing your custom message to
            // the user, the Content-Type should be exact "text/plain"
            // without any parameter. For more details, see the code at
            // https://github.com/git/git/commit/426e70d4a11ce3b4f70636d57c6a0ab16ae08a00#diff-eea0ad565ec5903a11b6023755d491cfR154
            response().setHeader("Content-Type", "text/plain");
            return forbidden(String.format("'%s' has no permission to '%s/%s'.", user.name, ownerName, projectName));
        }
    }
    if (isAdvertise) {
        return ok(RepositoryService.gitAdvertise(project, service, response()));
    } else {
        if (request().body().isMaxSizeExceeded()) {
            return status(REQUEST_ENTITY_TOO_LARGE);
        } else {
            user.visits(project);
            return ok(RepositoryService.gitRpc(project, service, request(), response()));
        }
    }
}

[Buggy Hunk]
user.name, ownerName, projectName));

[Patch]
user.loginId, ownerName, projectName));