Program: 62878
Project: 62878
Buggy source:
private static Notification createNotification(Context context,NotificationDetails notificationDetails){
  int resourceId;
  if (notificationDetails.iconResourceId == null) {
    if (notificationDetails.icon != null) {
      resourceId=context.getResources().getIdentifier(notificationDetails.icon,DRAWABLE,context.getPackageName());
    }
 else {
      resourceId=defaultIconResourceId;
    }
    notificationDetails.iconResourceId=resourceId;
  }
 else {
    resourceId=notificationDetails.iconResourceId;
  }
  setupNotificationChannel(context,notificationDetails);
  Intent intent=new Intent(context,getMainActivityClass(context));
  intent.setAction(SELECT_NOTIFICATION);
  intent.putExtra(PAYLOAD,notificationDetails.payload);
  PendingIntent pendingIntent=PendingIntent.getActivity(context,notificationDetails.id,intent,PendingIntent.FLAG_UPDATE_CURRENT);
  DefaultStyleInformation defaultStyleInformation=(DefaultStyleInformation)notificationDetails.styleInformation;
  NotificationCompat.Builder builder=new NotificationCompat.Builder(context,notificationDetails.channelId).setSmallIcon(resourceId).setContentTitle(defaultStyleInformation.htmlFormatTitle ? fromHtml(notificationDetails.title) : notificationDetails.title).setContentText(defaultStyleInformation.htmlFormatBody ? fromHtml(notificationDetails.body) : notificationDetails.body).setAutoCancel(BooleanUtils.getValue(notificationDetails.autoCancel)).setContentIntent(pendingIntent).setPriority(notificationDetails.priority).setOngoing(BooleanUtils.getValue(notificationDetails.ongoing));
  if (!StringUtils.isNullOrEmpty(notificationDetails.largeIcon)) {
    builder.setLargeIcon(getBitmapFromSource(context,notificationDetails.largeIcon,notificationDetails.largeIconBitmapSource));
  }
  if (notificationDetails.color != null) {
    builder.setColor(notificationDetails.color.intValue());
  }
  applyGrouping(notificationDetails,builder);
  setSound(context,notificationDetails,builder);
  setVibrationPattern(notificationDetails,builder);
  setStyle(context,notificationDetails,builder);
  Notification notification=builder.build();
  return notification;
}

Fixed version (ground truth):
public static Notification createNotification(Context context,NotificationDetails notificationDetails){
  setIconResourceId(context,notificationDetails);
  setupNotificationChannel(context,notificationDetails);
  Intent intent=new Intent(context,getMainActivityClass(context));
  intent.setAction(SELECT_NOTIFICATION);
  intent.putExtra(PAYLOAD,notificationDetails.payload);
  PendingIntent pendingIntent=PendingIntent.getActivity(context,notificationDetails.id,intent,PendingIntent.FLAG_UPDATE_CURRENT);
  DefaultStyleInformation defaultStyleInformation=(DefaultStyleInformation)notificationDetails.styleInformation;
  NotificationCompat.Builder builder=new NotificationCompat.Builder(context,notificationDetails.channelId).setSmallIcon(notificationDetails.iconResourceId).setContentTitle(defaultStyleInformation.htmlFormatTitle ? fromHtml(notificationDetails.title) : notificationDetails.title).setContentText(defaultStyleInformation.htmlFormatBody ? fromHtml(notificationDetails.body) : notificationDetails.body).setAutoCancel(BooleanUtils.getValue(notificationDetails.autoCancel)).setContentIntent(pendingIntent).setPriority(notificationDetails.priority).setOngoing(BooleanUtils.getValue(notificationDetails.ongoing));
  if (!StringUtils.isNullOrEmpty(notificationDetails.largeIcon)) {
    builder.setLargeIcon(getBitmapFromSource(context,notificationDetails.largeIcon,notificationDetails.largeIconBitmapSource));
  }
  if (notificationDetails.color != null) {
    builder.setColor(notificationDetails.color.intValue());
  }
  applyGrouping(notificationDetails,builder);
  setSound(context,notificationDetails,builder);
  setVibrationPattern(notificationDetails,builder);
  setStyle(context,notificationDetails,builder);
  Notification notification=builder.build();
  return notification;
}