[Demonstration 1]

[Buggy Method]
private void showNotificationTables(boolean alert) {
    String title = getResources().getString(R.string.notification_reserved_table_title);
    String content = getResources().getString(R.string.notification_reserved_table_content);
    NotificationCompat.Builder ntfBuilder = new NotificationCompat.Builder(ctx);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        ntfBuilder.setSmallIcon(R.drawable.verified);
    } else {
        ntfBuilder.setSmallIcon(R.drawable.table4);
    }
    ntfBuilder.setContentTitle(title);
    ntfBuilder.setContentText(content);
    ntfBuilder.setAutoCancel(true);
    // заперт удаления уведомления
    ntfBuilder.setOngoing(true);
    ntfBuilder.setLargeIcon(BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_notification));
    ntfBuilder.setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);
    Intent intent = new Intent(ctx, ReserveTableActivity.class);
    PendingIntent pendingIntent = PendingIntent.getActivity(ctx, 0, intent, 0);
    ntfBuilder.setContentIntent(pendingIntent);
    Notification notification = ntfBuilder.build();
    // если на оповещение никто нериагирует, запускаем более навящевый сигнал
    if (alert) {
        notification.flags = notification.flags | Notification.FLAG_INSISTENT;
    }
    notificationManager.notify(tableNotifyId, notification);
}

[Buggy Hunk]
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){

[Patch]
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){

[Demonstration 2]

[Buggy Method]
private void postNotification() {
    Intent IntentUnmute = new Intent(mContext, EnjoyTheSilenceService.class);
    IntentUnmute.putExtra("action", "unmute");
    IntentUnmute.putExtra("systemRingerMode", AudioManager.RINGER_MODE_NORMAL);
    PendingIntent pIntentUnmute = PendingIntent.getService(mContext, 0, IntentUnmute, 0);
    Notification note = new Notification.Builder(mContext).setContentTitle(mContext.getString(R.string.titleSilenceMode)).setContentText(mContext.getString(R.string.msgRestoreRingerMode)).setSmallIcon(R.drawable.ic_logo_bw).setColor(Color.RED).setContentIntent(pIntentUnmute).setAutoCancel(true).//.addAction(R.drawable.ic_launcher, "unmute", pIntentUnmute)
    //.addAction(R.drawable.ic_launcher_gray, "More", pIntentUnmute)
    build();
    note.flags |= Notification.FLAG_NO_CLEAR;
    note.flags |= Notification.FLAG_ONGOING_EVENT;
    if (Build.VERSION.SDK_INT >= 16) {
        note.priority = Notification.PRIORITY_HIGH;
    }
    NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(NOTIFICATION_ID, note);
}

[Buggy Hunk]
Notification note  = new Notification.Builder(mContext)

[Patch]
Notification note  = new NotificationCompat.Builder(mContext)

[Demonstration 3]

[Buggy Method]
private static URL[] convertToURL(String[] paths) {
    return Arrays.stream(paths).map(File::new).map(File::toURI).map(uri -> {
        try {
            return uri.toURL();
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }).toArray(URL[]::new);
}

[Buggy Hunk]
private static URL[] convertToURL(String[] paths) {

[Patch]
private URL[] convertToURL(String[] paths) {