Program: 79811
Project: 79811
Buggy source:
/** 
 * Update notification views upon each swipe, moving the next latest notification to 'Current Notification' spot, and remove it from the small icon container.
 * @param description Description of the StatusBarNotification we just swiped.
 * @return True if the update is successful, i.e there is more than one unread notification.False if the notification we just swipe away is the last unread notification.
 */
private boolean updateNotification(String description){
  GridLayout notificationContainer=(GridLayout)mPeekView.findViewById(NotificationPeek.NOTIFICATION_CONTAINER_ID);
  ImageView notificationIcon=(ImageView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_ICON_ID);
  TextView notificationTextView=(TextView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_TEXT_ID);
  View notificationView=mPeekView.findViewById(NotificationPeek.NOTIFICATION_VIEW_ID);
  int currentNotificationIdex=getCurrentNotificationIndex(notificationContainer,description);
  notificationContainer.removeViewAt(currentNotificationIdex);
  int nextNotificationIndex=notificationContainer.getChildCount() - 1;
  if (nextNotificationIndex >= 0) {
    StatusBarNotification nextNotification=(StatusBarNotification)notificationContainer.getChildAt(nextNotificationIndex).getTag();
    if (nextNotification.getNotification().largeIcon != null) {
      notificationIcon.setImageBitmap(NotificationPeekViewUtils.getRoundedShape(nextNotification.getNotification().largeIcon));
    }
 else {
      notificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this,nextNotification));
    }
    notificationTextView.setText(NotificationPeekViewUtils.getNotificationDisplayText(this,nextNotification));
    notificationView.setTranslationX(0);
    notificationView.animate().alpha(1f).start();
    notificationView.setTag(nextNotification);
    if (nextNotificationIndex == 0) {
      notificationContainer.getChildAt(nextNotificationIndex).setVisibility(View.GONE);
    }
 else {
      notificationContainer.getChildAt(nextNotificationIndex).setAlpha(1);
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Update notification views upon each swipe, moving the next latest notification to 'Current Notification' spot, and remove it from the small icon container.
 * @param description Description of the StatusBarNotification we just swiped.
 * @return True if the update is successful, i.e there is more than one unread notification.False if the notification we just swipe away is the last unread notification.
 */
private boolean updateNotification(String description){
  GridLayout notificationContainer=(GridLayout)mPeekView.findViewById(NotificationPeek.NOTIFICATION_CONTAINER_ID);
  ImageView notificationIcon=(ImageView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_ICON_ID);
  TextView notificationTextView=(TextView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_TEXT_ID);
  View notificationView=mPeekView.findViewById(NotificationPeek.NOTIFICATION_VIEW_ID);
  int currentNotificationIdex=getCurrentNotificationIndex(notificationContainer,description);
  notificationContainer.removeViewAt(currentNotificationIdex);
  int nextNotificationIndex=notificationContainer.getChildCount() - 1;
  if (nextNotificationIndex >= 0) {
    StatusBarNotification nextNotification=(StatusBarNotification)notificationContainer.getChildAt(nextNotificationIndex).getTag();
    if (nextNotification.getNotification().largeIcon != null) {
      notificationIcon.setImageBitmap(NotificationPeekViewUtils.getRoundedShape(nextNotification.getNotification().largeIcon));
    }
 else {
      notificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this,nextNotification));
    }
    notificationTextView.setText(NotificationPeekViewUtils.getNotificationDisplayText(this,nextNotification));
    notificationView.setTranslationX(0);
    notificationView.animate().alpha(1f).start();
    notificationView.setTag(nextNotification);
    if (nextNotification.getNotification().contentIntent != null) {
      final View.OnClickListener listener=new NotificationClicker(nextNotification,mPeek);
      notificationIcon.setOnClickListener(listener);
    }
    if (nextNotificationIndex == 0) {
      notificationContainer.getChildAt(nextNotificationIndex).setVisibility(View.GONE);
    }
 else {
      notificationContainer.getChildAt(nextNotificationIndex).setAlpha(1);
    }
    return true;
  }
  return false;
}