Program: 14221
Project: 14221
Buggy source:
private void handleDefaultPush(String from,@NonNull Bundle data){
  SimperiumUtils.configureSimperium(this,AccountHelper.getDefaultAccount().getAccessToken());
  long wpcomUserId=AccountHelper.getDefaultAccount().getUserId();
  String pushUserId=data.getString(PUSH_ARG_USER);
  if (!String.valueOf(wpcomUserId).equals(pushUserId)) {
    AppLog.e(T.NOTIFS,"String_Node_Str");
    return;
  }
  String noteType=StringUtils.notNullStr(data.getString(PUSH_ARG_TYPE));
  if (noteType.equals(PUSH_TYPE_PUSH_AUTH)) {
    handlePushAuth(from,data);
    return;
  }
  String title=StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_TITLE));
  if (title == null) {
    title=getString(R.string.app_name);
  }
  String message=StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_MSG));
  String noteId=data.getString(PUSH_ARG_NOTE_ID,"String_Node_Str");
  long thisTime=System.currentTimeMillis();
  if (mPreviousNoteId != null && mPreviousNoteId.equals(noteId)) {
    long seconds=TimeUnit.MILLISECONDS.toSeconds(thisTime - mPreviousNoteTime);
    if (seconds <= 1) {
      AppLog.w(T.NOTIFS,"String_Node_Str");
      return;
    }
  }
  mPreviousNoteId=noteId;
  mPreviousNoteTime=thisTime;
  int pushId=0;
  for (  int id : mActiveNotificationsMap.keySet()) {
    Bundle noteBundle=mActiveNotificationsMap.get(id);
    if (noteBundle != null && noteBundle.getString(PUSH_ARG_NOTE_ID,"String_Node_Str").equals(noteId)) {
      pushId=id;
      mActiveNotificationsMap.put(pushId,data);
      break;
    }
  }
  if (pushId == 0) {
    pushId=PUSH_NOTIFICATION_ID + mActiveNotificationsMap.size();
    mActiveNotificationsMap.put(pushId,data);
  }
  String iconUrl=data.getString("String_Node_Str");
  Bitmap largeIconBitmap=null;
  if (iconUrl != null) {
    try {
      iconUrl=URLDecoder.decode(iconUrl,"String_Node_Str");
      int largeIconSize=getResources().getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
      String resizedUrl=PhotonUtils.getPhotonImageUrl(iconUrl,largeIconSize,largeIconSize);
      largeIconBitmap=ImageUtils.downloadBitmap(resizedUrl);
      if (largeIconBitmap != null && shouldCircularizeNoteIcon(noteType)) {
        largeIconBitmap=ImageUtils.getCircularBitmap(largeIconBitmap);
      }
    }
 catch (    UnsupportedEncodingException e) {
      AppLog.e(T.NOTIFS,e);
    }
  }
  Map<String,String> properties=new HashMap<>();
  if (!TextUtils.isEmpty(noteType)) {
    if (noteType.equals(PUSH_TYPE_COMMENT)) {
      properties.put("String_Node_Str","String_Node_Str");
    }
 else {
      properties.put("String_Node_Str",noteType);
    }
  }
  AnalyticsTracker.track(Stat.PUSH_NOTIFICATION_RECEIVED,properties);
  NotificationCompat.Builder builder;
  builder=new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setColor(getResources().getColor(R.color.blue_wordpress)).setContentTitle(title).setContentText(message).setTicker(message).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(message)).setGroup(NOTIFICATION_GROUP_KEY);
  if (noteType.equals(PUSH_TYPE_COMMENT)) {
    Intent commentReplyIntent=new Intent(this,WPMainActivity.class);
    commentReplyIntent.putExtra(WPMainActivity.ARG_OPENED_FROM_PUSH,true);
    commentReplyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    commentReplyIntent.setAction("String_Node_Str");
    commentReplyIntent.addCategory("String_Node_Str");
    commentReplyIntent.addCategory("String_Node_Str");
    commentReplyIntent.putExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA,true);
    if (noteId != null) {
      commentReplyIntent.putExtra(NotificationsListFragment.NOTE_ID_EXTRA,noteId);
    }
    PendingIntent commentReplyPendingIntent=PendingIntent.getActivity(this,0,commentReplyIntent,PendingIntent.FLAG_CANCEL_CURRENT);
    builder.addAction(R.drawable.ic_reply_white_24dp,getText(R.string.reply),commentReplyPendingIntent);
  }
  if (largeIconBitmap != null) {
    builder.setLargeIcon(largeIconBitmap);
  }
  showNotificationForBuilder(builder,this,pushId);
  if (mActiveNotificationsMap.size() > 1) {
    NotificationCompat.InboxStyle inboxStyle=new NotificationCompat.InboxStyle();
    int noteCtr=1;
    for (    Bundle pushBundle : mActiveNotificationsMap.values()) {
      if (noteCtr > mMaxInboxItems) {
        break;
      }
      if (pushBundle == null || pushBundle.getString(PUSH_ARG_MSG) == null) {
        continue;
      }
      if (pushBundle.getString(PUSH_ARG_TYPE,"String_Node_Str").equals(PUSH_TYPE_COMMENT)) {
        String pnTitle=StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_TITLE)));
        String pnMessage=StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_MSG)));
        inboxStyle.addLine(pnTitle + "String_Node_Str" + pnMessage);
      }
 else {
        String pnMessage=StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_MSG)));
        inboxStyle.addLine(pnMessage);
      }
      noteCtr++;
    }
    if (mActiveNotificationsMap.size() > mMaxInboxItems) {
      inboxStyle.setSummaryText(String.format(getString(R.string.more_notifications),mActiveNotificationsMap.size() - mMaxInboxItems));
    }
    String subject=String.format(getString(R.string.new_notifications),mActiveNotificationsMap.size());
    NotificationCompat.Builder groupBuilder=new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setColor(getResources().getColor(R.color.blue_wordpress)).setGroup(NOTIFICATION_GROUP_KEY).setGroupSummary(true).setAutoCancel(true).setTicker(message).setContentTitle(getString(R.string.app_name)).setContentText(subject).setStyle(inboxStyle);
    showNotificationForBuilder(groupBuilder,this,GROUP_NOTIFICATION_ID);
  }
 else {
    builder.setGroupSummary(true);
    showNotificationForBuilder(builder,this,GROUP_NOTIFICATION_ID);
  }
  EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
}

Fixed version (ground truth):
private void handleDefaultPush(String from,@NonNull Bundle data){
  SimperiumUtils.configureSimperium(this,AccountHelper.getDefaultAccount().getAccessToken());
  long wpcomUserId=AccountHelper.getDefaultAccount().getUserId();
  String pushUserId=data.getString(PUSH_ARG_USER);
  if (!String.valueOf(wpcomUserId).equals(pushUserId)) {
    AppLog.e(T.NOTIFS,"String_Node_Str");
    return;
  }
  String noteType=StringUtils.notNullStr(data.getString(PUSH_ARG_TYPE));
  if (noteType.equals(PUSH_TYPE_PUSH_AUTH)) {
    handlePushAuth(from,data);
    return;
  }
  String title=StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_TITLE));
  if (title == null) {
    title=getString(R.string.app_name);
  }
  String message=StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_MSG));
  String noteId=data.getString(PUSH_ARG_NOTE_ID,"String_Node_Str");
  long thisTime=System.currentTimeMillis();
  if (mPreviousNoteId != null && mPreviousNoteId.equals(noteId)) {
    long seconds=TimeUnit.MILLISECONDS.toSeconds(thisTime - mPreviousNoteTime);
    if (seconds <= 1) {
      AppLog.w(T.NOTIFS,"String_Node_Str");
      return;
    }
  }
  mPreviousNoteId=noteId;
  mPreviousNoteTime=thisTime;
  int pushId=0;
  for (  Integer id : mActiveNotificationsMap.keySet()) {
    if (id == null) {
      continue;
    }
    Bundle noteBundle=mActiveNotificationsMap.get(id);
    if (noteBundle != null && noteBundle.getString(PUSH_ARG_NOTE_ID,"String_Node_Str").equals(noteId)) {
      pushId=id;
      mActiveNotificationsMap.put(pushId,data);
      break;
    }
  }
  if (pushId == 0) {
    pushId=PUSH_NOTIFICATION_ID + mActiveNotificationsMap.size();
    mActiveNotificationsMap.put(pushId,data);
  }
  String iconUrl=data.getString("String_Node_Str");
  Bitmap largeIconBitmap=null;
  if (iconUrl != null) {
    try {
      iconUrl=URLDecoder.decode(iconUrl,"String_Node_Str");
      int largeIconSize=getResources().getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
      String resizedUrl=PhotonUtils.getPhotonImageUrl(iconUrl,largeIconSize,largeIconSize);
      largeIconBitmap=ImageUtils.downloadBitmap(resizedUrl);
      if (largeIconBitmap != null && shouldCircularizeNoteIcon(noteType)) {
        largeIconBitmap=ImageUtils.getCircularBitmap(largeIconBitmap);
      }
    }
 catch (    UnsupportedEncodingException e) {
      AppLog.e(T.NOTIFS,e);
    }
  }
  Map<String,String> properties=new HashMap<>();
  if (!TextUtils.isEmpty(noteType)) {
    if (noteType.equals(PUSH_TYPE_COMMENT)) {
      properties.put("String_Node_Str","String_Node_Str");
    }
 else {
      properties.put("String_Node_Str",noteType);
    }
  }
  AnalyticsTracker.track(Stat.PUSH_NOTIFICATION_RECEIVED,properties);
  NotificationCompat.Builder builder;
  builder=new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setColor(getResources().getColor(R.color.blue_wordpress)).setContentTitle(title).setContentText(message).setTicker(message).setAutoCancel(true).setStyle(new NotificationCompat.BigTextStyle().bigText(message)).setGroup(NOTIFICATION_GROUP_KEY);
  if (noteType.equals(PUSH_TYPE_COMMENT)) {
    Intent commentReplyIntent=new Intent(this,WPMainActivity.class);
    commentReplyIntent.putExtra(WPMainActivity.ARG_OPENED_FROM_PUSH,true);
    commentReplyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    commentReplyIntent.setAction("String_Node_Str");
    commentReplyIntent.addCategory("String_Node_Str");
    commentReplyIntent.addCategory("String_Node_Str");
    commentReplyIntent.putExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA,true);
    if (noteId != null) {
      commentReplyIntent.putExtra(NotificationsListFragment.NOTE_ID_EXTRA,noteId);
    }
    PendingIntent commentReplyPendingIntent=PendingIntent.getActivity(this,0,commentReplyIntent,PendingIntent.FLAG_CANCEL_CURRENT);
    builder.addAction(R.drawable.ic_reply_white_24dp,getText(R.string.reply),commentReplyPendingIntent);
  }
  if (largeIconBitmap != null) {
    builder.setLargeIcon(largeIconBitmap);
  }
  showNotificationForBuilder(builder,this,pushId);
  if (mActiveNotificationsMap.size() > 1) {
    NotificationCompat.InboxStyle inboxStyle=new NotificationCompat.InboxStyle();
    int noteCtr=1;
    for (    Bundle pushBundle : mActiveNotificationsMap.values()) {
      if (noteCtr > mMaxInboxItems) {
        break;
      }
      if (pushBundle == null || pushBundle.getString(PUSH_ARG_MSG) == null) {
        continue;
      }
      if (pushBundle.getString(PUSH_ARG_TYPE,"String_Node_Str").equals(PUSH_TYPE_COMMENT)) {
        String pnTitle=StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_TITLE)));
        String pnMessage=StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_MSG)));
        inboxStyle.addLine(pnTitle + "String_Node_Str" + pnMessage);
      }
 else {
        String pnMessage=StringEscapeUtils.unescapeHtml((pushBundle.getString(PUSH_ARG_MSG)));
        inboxStyle.addLine(pnMessage);
      }
      noteCtr++;
    }
    if (mActiveNotificationsMap.size() > mMaxInboxItems) {
      inboxStyle.setSummaryText(String.format(getString(R.string.more_notifications),mActiveNotificationsMap.size() - mMaxInboxItems));
    }
    String subject=String.format(getString(R.string.new_notifications),mActiveNotificationsMap.size());
    NotificationCompat.Builder groupBuilder=new NotificationCompat.Builder(this).setSmallIcon(R.drawable.notification_icon).setColor(getResources().getColor(R.color.blue_wordpress)).setGroup(NOTIFICATION_GROUP_KEY).setGroupSummary(true).setAutoCancel(true).setTicker(message).setContentTitle(getString(R.string.app_name)).setContentText(subject).setStyle(inboxStyle);
    showNotificationForBuilder(groupBuilder,this,GROUP_NOTIFICATION_ID);
  }
 else {
    builder.setGroupSummary(true);
    showNotificationForBuilder(builder,this,GROUP_NOTIFICATION_ID);
  }
  EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
}