Program: 79806
Project: 79806
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){
  ImageView notificationIcon=(ImageView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_ICON_ID);
  TextView notificationTextView=(TextView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_TEXT_ID);
  int currentNotificationIdex=getCurrentNotificationIndex(mNotificationsContainer,description);
  mNotificationsContainer.removeViewAt(currentNotificationIdex);
  int nextNotificationIndex=mNotificationsContainer.getChildCount() - 1;
  if (nextNotificationIndex >= 0) {
    StatusBarNotification nextNotification=(StatusBarNotification)mNotificationsContainer.getChildAt(nextNotificationIndex).getTag();
    if (nextNotification.getNotification().largeIcon != null) {
      notificationIcon.setImageDrawable(NotificationPeekViewUtils.getRoundedShape(notificationIcon,nextNotification.getNotification().largeIcon));
    }
 else {
      notificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this,nextNotification));
    }
    notificationTextView.setText(NotificationPeekViewUtils.getNotificationDisplayText(this,nextNotification));
    mNotificationView.setTranslationX(0);
    mNotificationView.animate().alpha(1f).start();
    mNotificationView.setTag(nextNotification);
    if (nextNotification.getNotification().contentIntent != null) {
      final View.OnClickListener listener=new NotificationClicker(nextNotification,mPeek);
      notificationIcon.setOnClickListener(listener);
    }
    if (nextNotificationIndex == 0) {
      mNotificationsContainer.getChildAt(nextNotificationIndex).setVisibility(View.GONE);
    }
 else {
      mNotificationsContainer.getChildAt(nextNotificationIndex).setAlpha(1);
    }
    mPeek.updateNotificationTextAlpha(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){
  ImageView notificationIcon=(ImageView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_ICON_ID);
  TextView notificationTextView=(TextView)mPeekView.findViewById(NotificationPeek.NOTIFICATION_TEXT_ID);
  int currentNotificationIdex=getCurrentNotificationIndex(mNotificationsContainer,description);
  mNotificationsContainer.removeViewAt(currentNotificationIdex);
  int nextNotificationIndex=mNotificationsContainer.getChildCount() - 1;
  if (nextNotificationIndex >= 0) {
    StatusBarNotification nextNotification=(StatusBarNotification)mNotificationsContainer.getChildAt(nextNotificationIndex).getTag();
    if (nextNotification.getNotification().largeIcon != null) {
      notificationIcon.setImageDrawable(NotificationPeekViewUtils.getRoundedShape(getResources(),nextNotification.getNotification().largeIcon));
    }
 else {
      notificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this,nextNotification));
    }
    notificationTextView.setText(NotificationPeekViewUtils.getNotificationDisplayText(this,nextNotification));
    mNotificationView.setTranslationX(0);
    mNotificationView.animate().alpha(1f).start();
    mNotificationView.setTag(nextNotification);
    if (nextNotification.getNotification().contentIntent != null) {
      final View.OnClickListener listener=new NotificationClicker(nextNotification,mPeek);
      notificationIcon.setOnClickListener(listener);
    }
    if (nextNotificationIndex == 0) {
      mNotificationsContainer.getChildAt(nextNotificationIndex).setVisibility(View.GONE);
    }
 else {
      mNotificationsContainer.getChildAt(nextNotificationIndex).setAlpha(1);
    }
    mPeek.updateNotificationTextAlpha(1);
    return true;
  }
  return false;
}