[Demonstration 1]

[Buggy Method]
private void sendNotification(String productId, String messageBody) {
    final Intent intent = new Intent(this, MainActivity.class);
    intent.putExtra(EXTRA_PRODUCT_CODE, productId);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
    PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, /* Request code */
    intent, PendingIntent.FLAG_UPDATE_CURRENT);
    Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this).setSmallIcon(R.mipmap.ic_launcher).setContentTitle("FCM Message").setContentText(messageBody).setAutoCancel(true).setSound(defaultSoundUri).setContentIntent(pendingIntent).setDefaults(Notification.DEFAULT_ALL).setPriority(Notification.PRIORITY_MAX);
    NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(0, /* ID of notification */
    notificationBuilder.build());
}

[Buggy Hunk]
final Intent intent = new Intent(this, MainActivity.class);

[Patch]
final Intent intent = new Intent(this, PriceCompareActivity.class);

[Demonstration 2]

[Buggy Method]
protected String doInBackground(Void... params) {
    if (mDisplayIndex < 0) {
        Toast.makeText(getContext(), R.string.msg_error_interrupt, Toast.LENGTH_SHORT).show();
        return null;
    }
    mWorkingIndex = mDisplayIndex;
    Gpack gpack = mPackageInfos.get(mWorkingIndex).getGpack();
    String packageName = gpack.packageName;
    File targetFile = new File(AppHelper.getAppExternalPath(), packageName);
    if (targetFile.exists() && checkDownload(gpack, targetFile)) {
        return packageName;
    } else {
        // start download
        Intent data = new Intent();
        data.putExtra("path", targetFile.getPath());
        CloudHelper.downloadPackage(CloudHelper.CLOUD_DOMAIN + packageName, data);
    }
    return null;
}

[Buggy Hunk]
CloudHelper.downloadPackage(CloudHelper.CLOUD_DOMAIN + packageName, data);

[Patch]
CloudHelper.downloadPackage(packageName, data);

[Demonstration 3]

[Buggy Method]
private File serializeToFile(final File target, String targetSubFolder, String fileName, String extension, String source) throws IOException {
    File targetFolder = new File(target, targetSubFolder);
    File targetFile = new File(targetFolder, fileName + extension);
    FileUtils.writeStringToFile(targetFile, source);
    return targetFile;
}

[Buggy Hunk]
FileUtils.writeStringToFile(targetFile, source);

[Patch]
FileUtils.writeStringToFile(targetFile, source, TARGET_FILES_ENCODING);