Program: 7602
Project: 7602
Buggy source:
private void updateCompletedNotification(List<DownloadInfo> downloads){
  for (  DownloadInfo download : downloads) {
    if (!isCompleteAndVisible(download)) {
      return;
    }
    Notification n=new Notification();
    n.icon=android.R.drawable.stat_sys_download_done;
    long id=download.mId;
    String title=download.mTitle;
    if (title == null || title.length() == 0) {
      title=mContext.getResources().getString(R.string.download_unknown_title);
    }
    Uri contentUri=Uri.parse(Downloads.Impl.CONTENT_URI + "String_Node_Str" + id);
    String caption;
    Intent intent;
    if (Downloads.Impl.isStatusError(download.mStatus)) {
      caption=mContext.getResources().getString(R.string.notification_download_failed);
      intent=new Intent(Constants.ACTION_LIST);
    }
 else {
      caption=mContext.getResources().getString(R.string.notification_download_complete);
      if (download.mDestination == Downloads.Impl.DESTINATION_EXTERNAL) {
        intent=new Intent(Constants.ACTION_OPEN);
      }
 else {
        intent=new Intent(Constants.ACTION_LIST);
      }
    }
    intent.setClassName("String_Node_Str",DownloadReceiver.class.getName());
    intent.setData(contentUri);
    n.when=download.mLastMod;
    n.setLatestEventInfo(mContext,title,caption,PendingIntent.getBroadcast(mContext,0,intent,0));
    intent=new Intent(Constants.ACTION_HIDE);
    intent.setClassName("String_Node_Str",DownloadReceiver.class.getName());
    intent.setData(contentUri);
    n.deleteIntent=PendingIntent.getBroadcast(mContext,0,intent,0);
    mSystemFacade.postNotification(download.mId,n);
  }
}

Fixed version (ground truth):
private void updateCompletedNotification(List<DownloadInfo> downloads){
  for (  DownloadInfo download : downloads) {
    if (!isCompleteAndVisible(download)) {
      continue;
    }
    Notification n=new Notification();
    n.icon=android.R.drawable.stat_sys_download_done;
    long id=download.mId;
    String title=download.mTitle;
    if (title == null || title.length() == 0) {
      title=mContext.getResources().getString(R.string.download_unknown_title);
    }
    Uri contentUri=Uri.parse(Downloads.Impl.CONTENT_URI + "String_Node_Str" + id);
    String caption;
    Intent intent;
    if (Downloads.Impl.isStatusError(download.mStatus)) {
      caption=mContext.getResources().getString(R.string.notification_download_failed);
      intent=new Intent(Constants.ACTION_LIST);
    }
 else {
      caption=mContext.getResources().getString(R.string.notification_download_complete);
      if (download.mDestination == Downloads.Impl.DESTINATION_EXTERNAL) {
        intent=new Intent(Constants.ACTION_OPEN);
      }
 else {
        intent=new Intent(Constants.ACTION_LIST);
      }
    }
    intent.setClassName("String_Node_Str",DownloadReceiver.class.getName());
    intent.setData(contentUri);
    n.when=download.mLastMod;
    n.setLatestEventInfo(mContext,title,caption,PendingIntent.getBroadcast(mContext,0,intent,0));
    intent=new Intent(Constants.ACTION_HIDE);
    intent.setClassName("String_Node_Str",DownloadReceiver.class.getName());
    intent.setData(contentUri);
    n.deleteIntent=PendingIntent.getBroadcast(mContext,0,intent,0);
    mSystemFacade.postNotification(download.mId,n);
  }
}