[Demonstration 1]

[Buggy Method]
public boolean ballBallHit(Ball ballA, Ball ballB) {
    int radiusA = ballA.getRadius();
    int radiusB = ballB.getRadius();
    float deltaX = Math.abs(ballA.getxPosCenter() - ballB.getxPosCenter());
    float deltaY = Math.abs(ballA.getyPosCenter() - ballB.getyPosCenter());
    float distance = (float) Math.pow(deltaX * deltaX + deltaY * deltaY, .5);
    if (distance <= radiusA + radiusB && (ballA.getLastIdHit() != ballB.getId() || ballB.getLastIdHit() != ballA.getId())) {
        System.out.println("Collision between R1(" + ballA.getRadius() + ") and R2(" + ballB.getRadius() + ") distance: " + distance);
        ballA.setLastIdHit(ballB.getId());
        ballB.setLastIdHit(ballA.getId());
        return true;
    }
    return false;
}

[Buggy Hunk]
System.out.println("Collision between R1(" + ballA.getRadius() + ") and R2(" + ballB.getRadius() + ") distance: " + distance);

[Patch]
System.out.println("Collision between (" + ballA.getId() + ") and (" + ballB.getId() + ") distance: " + distance);

[Demonstration 2]

[Buggy Method]
public void showNotification() {
    String ns = Context.NOTIFICATION_SERVICE;
    NotificationManager notificationManager = (NotificationManager) getSystemService(ns);
    int icon = R.drawable.ic_lock_white_24dp;
    long when = System.currentTimeMillis();
    Context context = getApplicationContext();
    Intent notificationIntent = new Intent(this, ConfirmPinCodeActivity.class);
    PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
    Notification notification;
    notification = new Notification.Builder(context).setContentTitle("Mã xác nhận").setContentText(code + " Bạn đã đăng ký thành công! ").setSmallIcon(icon).setContentIntent(contentIntent).setWhen(when).setAutoCancel(true).build();
    notification.flags |= Notification.FLAG_AUTO_CANCEL;
    notification.defaults |= Notification.DEFAULT_SOUND;
    notificationManager.notify(5, notification);
}

[Buggy Hunk]
int icon = R.drawable.ic_lock_white_24dp;

[Patch]
int icon = R.drawable.splash;

[Demonstration 3]

[Buggy Method]
private void showNotification(boolean locked) {
    int message = locked ? R.string.portrait_orientation_locked : R.string.portrait_orientation_unlocked;
    Notification notification = new Notification(locked ? R.drawable.ic_locked : R.drawable.ic_unlocked, getText(message), System.currentTimeMillis());
    PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, RotationLockActivity.class), 0);
    notification.setLatestEventInfo((Context) this, getText(R.string.app_name), (CharSequence) getText(message), contentIntent);
    notification.flags |= Notification.FLAG_ONGOING_EVENT;
    notification.icon = locked ? R.drawable.ic_stat_locked : R.drawable.ic_stat_unlocked;
    mNotificationManager.notify(R.string.app_name, notification);
}

[Buggy Hunk]
notification.flags |= Notification.FLAG_ONGOING_EVENT;

[Patch]
notification.flags |= Notification.FLAG_NO_CLEAR | Notification.FLAG_ONGOING_EVENT;