Program: 15107
Project: 15107
Buggy source:
@Override protected void onMessage(Context context,Intent intent){
  Log.v("String_Node_Str","String_Node_Str");
  Bundle extras=intent.getExtras();
  if (extras == null) {
    Log.v("String_Node_Str","String_Node_Str");
    return;
  }
  String title=extras.getString("String_Node_Str");
  if (title == null)   title="String_Node_Str";
  String message=EscapeUtils.unescapeHtml(extras.getString("String_Node_Str"));
  String note_id=extras.getString("String_Node_Str");
  if (note_id == null)   note_id=StringUtils.getMd5Hash(message);
  if (note_id != null) {
    if (!activeNotificationsMap.containsKey(note_id))     activeNotificationsMap.put(note_id,extras);
  }
  String iconURL=extras.getString("String_Node_Str");
  Bitmap largeIconBitmap=null;
  if (iconURL != null) {
    try {
      iconURL=URLDecoder.decode(iconURL,"String_Node_Str");
    }
 catch (    UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    float screenDensity=getResources().getDisplayMetrics().densityDpi;
    int size=Math.round(64 * (screenDensity / 160));
    String resizedURL=iconURL.replaceAll("String_Node_Str","String_Node_Str" + size);
    largeIconBitmap=ImageHelper.downloadBitmap(resizedURL);
  }
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  boolean sound, vibrate, light;
  sound=prefs.getBoolean("String_Node_Str",false);
  vibrate=prefs.getBoolean("String_Node_Str",false);
  light=prefs.getBoolean("String_Node_Str",false);
  NotificationCompat.Builder mBuilder;
  Intent resultIntent=new Intent(this,PostsActivity.class);
  resultIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | IntentCompat.FLAG_ACTIVITY_CLEAR_TASK);
  resultIntent.setAction("String_Node_Str");
  resultIntent.addCategory("String_Node_Str");
  resultIntent.putExtra(NotificationsActivity.FROM_NOTIFICATION_EXTRA,true);
  if (activeNotificationsMap.size() <= 1) {
    mBuilder=new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setContentTitle(title).setContentText(message).setTicker(message).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(message));
    if (note_id != null)     resultIntent.putExtra(NotificationsActivity.NOTE_ID_EXTRA,note_id);
    String noteType=extras.getString("String_Node_Str");
    if (noteType != null && noteType.equals("String_Node_Str")) {
      Intent commentReplyIntent=new Intent(this,PostsActivity.class);
      commentReplyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | IntentCompat.FLAG_ACTIVITY_CLEAR_TASK);
      commentReplyIntent.setAction("String_Node_Str");
      commentReplyIntent.addCategory("String_Node_Str");
      commentReplyIntent.addCategory("String_Node_Str");
      commentReplyIntent.putExtra(NotificationsActivity.FROM_NOTIFICATION_EXTRA,true);
      commentReplyIntent.putExtra(NotificationsActivity.NOTE_INSTANT_REPLY_EXTRA,true);
      if (note_id != null)       commentReplyIntent.putExtra(NotificationsActivity.NOTE_ID_EXTRA,note_id);
      PendingIntent commentReplyPendingIntent=PendingIntent.getActivity(context,0,commentReplyIntent,PendingIntent.FLAG_CANCEL_CURRENT);
      mBuilder.addAction(R.drawable.ab_icon_reply,getResources().getText(R.string.reply),commentReplyPendingIntent);
    }
    if (largeIconBitmap != null) {
      mBuilder.setLargeIcon(largeIconBitmap);
    }
  }
 else {
    NotificationCompat.InboxStyle inboxStyle=new NotificationCompat.InboxStyle();
    int noteCtr=1;
    for (    Bundle wpNotification : activeNotificationsMap.values()) {
      if (noteCtr > 5)       break;
      if (wpNotification.getString("String_Node_Str") != null) {
        if (wpNotification.getString("String_Node_Str").equals("String_Node_Str"))         inboxStyle.addLine(wpNotification.getString("String_Node_Str") + "String_Node_Str" + wpNotification.getString("String_Node_Str"));
 else         inboxStyle.addLine(wpNotification.getString("String_Node_Str"));
        noteCtr++;
      }
    }
    if (activeNotificationsMap.size() > 5)     inboxStyle.setSummaryText(String.format(getString(R.string.more_notifications),activeNotificationsMap.size() - 5));
    String subject=String.format(getString(R.string.new_notifications),activeNotificationsMap.size());
    mBuilder=new NotificationCompat.Builder(this).setLargeIcon(BitmapFactory.decodeResource(getResources(),R.drawable.notification_multi)).setSmallIcon(R.drawable.notification_icon).setContentTitle("String_Node_Str").setContentText(subject).setTicker(message).setAutoCancel(true).setStyle(inboxStyle);
  }
  if (sound)   mBuilder.setSound(Uri.parse("String_Node_Str" + getPackageName() + "String_Node_Str"+ R.raw.notification));
  if (vibrate)   mBuilder.setVibrate(new long[]{500,500,500});
  if (light)   mBuilder.setLights(0xff0000ff,1000,5000);
  PendingIntent pendingIntent=PendingIntent.getActivity(context,0,resultIntent,PendingIntent.FLAG_CANCEL_CURRENT);
  mBuilder.setContentIntent(pendingIntent);
  NotificationManager mNotificationManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  mNotificationManager.notify(notificationId,mBuilder.build());
}

Fixed version (ground truth):
@Override protected void onMessage(Context context,Intent intent){
  Log.v("String_Node_Str","String_Node_Str");
  Bundle extras=intent.getExtras();
  if (extras == null) {
    Log.v("String_Node_Str","String_Node_Str");
    return;
  }
  String title=extras.getString("String_Node_Str");
  if (title == null)   title="String_Node_Str";
  String message=StringUtils.unescapeHTML(extras.getString("String_Node_Str"));
  String note_id=extras.getString("String_Node_Str");
  if (note_id == null)   note_id=StringUtils.getMd5Hash(message);
  if (note_id != null) {
    if (!activeNotificationsMap.containsKey(note_id))     activeNotificationsMap.put(note_id,extras);
  }
  String iconURL=extras.getString("String_Node_Str");
  Bitmap largeIconBitmap=null;
  if (iconURL != null) {
    try {
      iconURL=URLDecoder.decode(iconURL,"String_Node_Str");
    }
 catch (    UnsupportedEncodingException e) {
      e.printStackTrace();
    }
    float screenDensity=getResources().getDisplayMetrics().densityDpi;
    int size=Math.round(64 * (screenDensity / 160));
    String resizedURL=iconURL.replaceAll("String_Node_Str","String_Node_Str" + size);
    largeIconBitmap=ImageHelper.downloadBitmap(resizedURL);
  }
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  boolean sound, vibrate, light;
  sound=prefs.getBoolean("String_Node_Str",false);
  vibrate=prefs.getBoolean("String_Node_Str",false);
  light=prefs.getBoolean("String_Node_Str",false);
  NotificationCompat.Builder mBuilder;
  Intent resultIntent=new Intent(this,PostsActivity.class);
  resultIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | IntentCompat.FLAG_ACTIVITY_CLEAR_TASK);
  resultIntent.setAction("String_Node_Str");
  resultIntent.addCategory("String_Node_Str");
  resultIntent.putExtra(NotificationsActivity.FROM_NOTIFICATION_EXTRA,true);
  if (activeNotificationsMap.size() <= 1) {
    mBuilder=new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setContentTitle(title).setContentText(message).setTicker(message).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(message));
    if (note_id != null)     resultIntent.putExtra(NotificationsActivity.NOTE_ID_EXTRA,note_id);
    String noteType=extras.getString("String_Node_Str");
    if (noteType != null && noteType.equals("String_Node_Str")) {
      Intent commentReplyIntent=new Intent(this,PostsActivity.class);
      commentReplyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | IntentCompat.FLAG_ACTIVITY_CLEAR_TASK);
      commentReplyIntent.setAction("String_Node_Str");
      commentReplyIntent.addCategory("String_Node_Str");
      commentReplyIntent.addCategory("String_Node_Str");
      commentReplyIntent.putExtra(NotificationsActivity.FROM_NOTIFICATION_EXTRA,true);
      commentReplyIntent.putExtra(NotificationsActivity.NOTE_INSTANT_REPLY_EXTRA,true);
      if (note_id != null)       commentReplyIntent.putExtra(NotificationsActivity.NOTE_ID_EXTRA,note_id);
      PendingIntent commentReplyPendingIntent=PendingIntent.getActivity(context,0,commentReplyIntent,PendingIntent.FLAG_CANCEL_CURRENT);
      mBuilder.addAction(R.drawable.ab_icon_reply,getResources().getText(R.string.reply),commentReplyPendingIntent);
    }
    if (largeIconBitmap != null) {
      mBuilder.setLargeIcon(largeIconBitmap);
    }
  }
 else {
    NotificationCompat.InboxStyle inboxStyle=new NotificationCompat.InboxStyle();
    int noteCtr=1;
    for (    Bundle wpNotification : activeNotificationsMap.values()) {
      if (noteCtr > 5)       break;
      if (wpNotification.getString("String_Node_Str") != null) {
        if (wpNotification.getString("String_Node_Str").equals("String_Node_Str"))         inboxStyle.addLine(wpNotification.getString("String_Node_Str") + "String_Node_Str" + wpNotification.getString("String_Node_Str"));
 else         inboxStyle.addLine(wpNotification.getString("String_Node_Str"));
        noteCtr++;
      }
    }
    if (activeNotificationsMap.size() > 5)     inboxStyle.setSummaryText(String.format(getString(R.string.more_notifications),activeNotificationsMap.size() - 5));
    String subject=String.format(getString(R.string.new_notifications),activeNotificationsMap.size());
    mBuilder=new NotificationCompat.Builder(this).setLargeIcon(BitmapFactory.decodeResource(getResources(),R.drawable.notification_multi)).setSmallIcon(R.drawable.notification_icon).setContentTitle("String_Node_Str").setContentText(subject).setTicker(message).setAutoCancel(true).setStyle(inboxStyle);
  }
  if (sound)   mBuilder.setSound(Uri.parse("String_Node_Str" + getPackageName() + "String_Node_Str"+ R.raw.notification));
  if (vibrate)   mBuilder.setVibrate(new long[]{500,500,500});
  if (light)   mBuilder.setLights(0xff0000ff,1000,5000);
  PendingIntent pendingIntent=PendingIntent.getActivity(context,0,resultIntent,PendingIntent.FLAG_CANCEL_CURRENT);
  mBuilder.setContentIntent(pendingIntent);
  NotificationManager mNotificationManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  mNotificationManager.notify(notificationId,mBuilder.build());
}