Program: 79788
Project: 79788
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){
  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) {
      mNotificationIcon.setImageDrawable(NotificationPeekViewUtils.getRoundedShape(getResources(),nextNotification.getNotification().largeIcon));
    }
 else {
      mNotificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this,nextNotification));
    }
    mNotificationText.setText(NotificationPeekViewUtils.getNotificationDisplayText(this,nextNotification));
    mNotificationView.setTranslationX(0);
    mNotificationView.animate().alpha(1f).start();
    mNotificationView.setTag(nextNotification);
    if (nextNotification.getNotification().contentIntent != null) {
      mNotificationClicker=new NotificationClicker(nextNotification,mPeek);
      mNotificationIcon.setOnClickListener(mNotificationClicker);
    }
    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){
  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) {
      mNotificationIcon.setImageDrawable(NotificationPeekViewUtils.getRoundedShape(getResources(),nextNotification.getNotification().largeIcon));
    }
 else {
      mNotificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(this,nextNotification));
    }
    mNotificationText.setText(NotificationPeekViewUtils.getNotificationDisplayText(this,nextNotification));
    mNotificationView.setTranslationX(0);
    mNotificationView.animate().alpha(1f).start();
    mNotificationView.setTag(nextNotification);
    if (nextNotification.getNotification().contentIntent != null) {
      NotificationClicker mNotificationClicker=new NotificationClicker(nextNotification,mPeek);
      mNotificationIcon.setOnClickListener(mNotificationClicker);
    }
    if (nextNotificationIndex == 0) {
      mNotificationsContainer.getChildAt(nextNotificationIndex).setVisibility(View.GONE);
    }
 else {
      mNotificationsContainer.getChildAt(nextNotificationIndex).setAlpha(1);
    }
    mPeek.updateNotificationTextAlpha(1);
    return true;
  }
  return false;
}