Program: 7604
Project: 7604
Buggy source:
/** 
 * Keeps a local copy of the info about a download, and initiates the download if appropriate.
 */
private void insertDownload(Cursor cursor,int arrayPos,long now){
  DownloadInfo info=new DownloadInfo(this,mSystemFacade,cursor);
  if (Constants.LOGVV) {
    Log.v(Constants.TAG,"String_Node_Str");
    Log.v(Constants.TAG,"String_Node_Str" + info.mId);
    Log.v(Constants.TAG,"String_Node_Str" + ((info.mUri != null) ? "String_Node_Str" : "String_Node_Str"));
    Log.v(Constants.TAG,"String_Node_Str" + info.mNoIntegrity);
    Log.v(Constants.TAG,"String_Node_Str" + info.mHint);
    Log.v(Constants.TAG,"String_Node_Str" + info.mFileName);
    Log.v(Constants.TAG,"String_Node_Str" + info.mMimeType);
    Log.v(Constants.TAG,"String_Node_Str" + info.mDestination);
    Log.v(Constants.TAG,"String_Node_Str" + info.mVisibility);
    Log.v(Constants.TAG,"String_Node_Str" + info.mControl);
    Log.v(Constants.TAG,"String_Node_Str" + info.mStatus);
    Log.v(Constants.TAG,"String_Node_Str" + info.mNumFailed);
    Log.v(Constants.TAG,"String_Node_Str" + info.mRetryAfter);
    Log.v(Constants.TAG,"String_Node_Str" + info.mRedirectCount);
    Log.v(Constants.TAG,"String_Node_Str" + info.mLastMod);
    Log.v(Constants.TAG,"String_Node_Str" + info.mPackage);
    Log.v(Constants.TAG,"String_Node_Str" + info.mClass);
    Log.v(Constants.TAG,"String_Node_Str" + ((info.mCookies != null) ? "String_Node_Str" : "String_Node_Str"));
    Log.v(Constants.TAG,"String_Node_Str" + info.mUserAgent);
    Log.v(Constants.TAG,"String_Node_Str" + ((info.mReferer != null) ? "String_Node_Str" : "String_Node_Str"));
    Log.v(Constants.TAG,"String_Node_Str" + info.mTotalBytes);
    Log.v(Constants.TAG,"String_Node_Str" + info.mCurrentBytes);
    Log.v(Constants.TAG,"String_Node_Str" + info.mETag);
    Log.v(Constants.TAG,"String_Node_Str" + info.mMediaScanned);
  }
  mDownloads.add(arrayPos,info);
  if (info.mStatus == 0 && (info.mDestination == Downloads.Impl.DESTINATION_EXTERNAL || info.mDestination == Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE) && info.mMimeType != null && !DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING.equalsIgnoreCase(info.mMimeType)) {
    Intent mimetypeIntent=new Intent(Intent.ACTION_VIEW);
    mimetypeIntent.setDataAndType(Uri.fromParts("String_Node_Str","String_Node_Str",null),info.mMimeType);
    ResolveInfo ri=getPackageManager().resolveActivity(mimetypeIntent,PackageManager.MATCH_DEFAULT_ONLY);
    if (ri == null) {
      if (Config.LOGD) {
        Log.d(Constants.TAG,"String_Node_Str" + info.mMimeType);
      }
      info.mStatus=Downloads.Impl.STATUS_NOT_ACCEPTABLE;
      Uri uri=ContentUris.withAppendedId(Downloads.Impl.CONTENT_URI,info.mId);
      ContentValues values=new ContentValues();
      values.put(Downloads.Impl.COLUMN_STATUS,Downloads.Impl.STATUS_NOT_ACCEPTABLE);
      getContentResolver().update(uri,values,null,null);
      info.sendIntentIfRequested(uri);
      return;
    }
  }
  info.startIfReady(now);
}

Fixed version (ground truth):
/** 
 * Keeps a local copy of the info about a download, and initiates the download if appropriate.
 */
private void insertDownload(Cursor cursor,int arrayPos,long now){
  DownloadInfo info=new DownloadInfo(this,mSystemFacade,cursor);
  if (Constants.LOGVV) {
    Log.v(Constants.TAG,"String_Node_Str");
    Log.v(Constants.TAG,"String_Node_Str" + info.mId);
    Log.v(Constants.TAG,"String_Node_Str" + ((info.mUri != null) ? "String_Node_Str" : "String_Node_Str"));
    Log.v(Constants.TAG,"String_Node_Str" + info.mNoIntegrity);
    Log.v(Constants.TAG,"String_Node_Str" + info.mHint);
    Log.v(Constants.TAG,"String_Node_Str" + info.mFileName);
    Log.v(Constants.TAG,"String_Node_Str" + info.mMimeType);
    Log.v(Constants.TAG,"String_Node_Str" + info.mDestination);
    Log.v(Constants.TAG,"String_Node_Str" + info.mVisibility);
    Log.v(Constants.TAG,"String_Node_Str" + info.mControl);
    Log.v(Constants.TAG,"String_Node_Str" + info.mStatus);
    Log.v(Constants.TAG,"String_Node_Str" + info.mNumFailed);
    Log.v(Constants.TAG,"String_Node_Str" + info.mRetryAfter);
    Log.v(Constants.TAG,"String_Node_Str" + info.mRedirectCount);
    Log.v(Constants.TAG,"String_Node_Str" + info.mLastMod);
    Log.v(Constants.TAG,"String_Node_Str" + info.mPackage);
    Log.v(Constants.TAG,"String_Node_Str" + info.mClass);
    Log.v(Constants.TAG,"String_Node_Str" + ((info.mCookies != null) ? "String_Node_Str" : "String_Node_Str"));
    Log.v(Constants.TAG,"String_Node_Str" + info.mUserAgent);
    Log.v(Constants.TAG,"String_Node_Str" + ((info.mReferer != null) ? "String_Node_Str" : "String_Node_Str"));
    Log.v(Constants.TAG,"String_Node_Str" + info.mTotalBytes);
    Log.v(Constants.TAG,"String_Node_Str" + info.mCurrentBytes);
    Log.v(Constants.TAG,"String_Node_Str" + info.mETag);
    Log.v(Constants.TAG,"String_Node_Str" + info.mMediaScanned);
  }
  mDownloads.add(arrayPos,info);
  if (info.mStatus == 0 && (info.mDestination == Downloads.Impl.DESTINATION_EXTERNAL || info.mDestination == Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE) && info.mMimeType != null && !DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING.equalsIgnoreCase(info.mMimeType)) {
    Intent mimetypeIntent=new Intent(Intent.ACTION_VIEW);
    mimetypeIntent.setDataAndType(Uri.fromParts("String_Node_Str","String_Node_Str",null),info.mMimeType);
    ResolveInfo ri=getPackageManager().resolveActivity(mimetypeIntent,PackageManager.MATCH_DEFAULT_ONLY);
    if (ri == null) {
      if (Config.LOGD) {
        Log.d(Constants.TAG,"String_Node_Str" + info.mMimeType);
      }
      info.mStatus=Downloads.Impl.STATUS_NOT_ACCEPTABLE;
      Uri uri=ContentUris.withAppendedId(Downloads.Impl.CONTENT_URI,info.mId);
      ContentValues values=new ContentValues();
      values.put(Downloads.Impl.COLUMN_STATUS,Downloads.Impl.STATUS_NOT_ACCEPTABLE);
      getContentResolver().update(uri,values,null,null);
      info.sendIntentIfRequested(uri);
      return;
    }
  }
  if (info.isReadyToStart(now)) {
    info.start(now);
  }
}