Program: 165250
Project: 165250
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  Utils.debugLog(TAG,"String_Node_Str" + intent);
  if (!ACTION_INSTALL.equals(intent.getAction())) {
    Utils.debugLog(TAG,"String_Node_Str" + intent + "String_Node_Str"+ ACTION_INSTALL+ "String_Node_Str");
    return START_NOT_STICKY;
  }
  String urlString=intent.getDataString();
  if (TextUtils.isEmpty(urlString)) {
    Utils.debugLog(TAG,"String_Node_Str");
    return START_NOT_STICKY;
  }
  if (!intent.hasExtra(EXTRA_APP) || !intent.hasExtra(EXTRA_APK)) {
    Utils.debugLog(TAG,urlString + "String_Node_Str");
    return START_NOT_STICKY;
  }
  if (!DownloaderService.isQueuedOrActive(urlString)) {
    Utils.debugLog(TAG,urlString + "String_Node_Str");
    cancelNotification(urlString);
    return START_NOT_STICKY;
  }
  App app=new App(intent.getParcelableExtra(EXTRA_APP));
  Apk apk=new Apk(intent.getParcelableExtra(EXTRA_APK));
  addToActive(urlString,app,apk);
  Notification notification=createNotification(intent.getDataString(),apk).build();
  notificationManager.notify(urlString.hashCode(),notification);
  registerDownloaderReceivers(urlString);
  File apkFilePath=Utils.getApkDownloadPath(this,intent.getData());
  long apkFileSize=apkFilePath.length();
  if (!apkFilePath.exists() || apkFileSize < apk.size) {
    Utils.debugLog(TAG,"String_Node_Str" + urlString + "String_Node_Str"+ apkFilePath);
    DownloaderService.queue(this,urlString);
  }
 else   if (apkIsCached(apkFilePath,apk)) {
    Utils.debugLog(TAG,"String_Node_Str" + urlString + "String_Node_Str"+ apkFilePath);
    sendBroadcast(intent.getData(),Downloader.ACTION_STARTED,apkFilePath);
    sendBroadcast(intent.getData(),Downloader.ACTION_COMPLETE,apkFilePath);
  }
 else {
    Utils.debugLog(TAG,"String_Node_Str" + urlString + "String_Node_Str"+ apkFilePath);
    apkFilePath.delete();
    DownloaderService.queue(this,urlString);
  }
  return START_REDELIVER_INTENT;
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  Utils.debugLog(TAG,"String_Node_Str" + intent);
  if (!ACTION_INSTALL.equals(intent.getAction())) {
    Utils.debugLog(TAG,"String_Node_Str" + intent + "String_Node_Str"+ ACTION_INSTALL+ "String_Node_Str");
    return START_NOT_STICKY;
  }
  String urlString=intent.getDataString();
  if (TextUtils.isEmpty(urlString)) {
    Utils.debugLog(TAG,"String_Node_Str");
    return START_NOT_STICKY;
  }
  if (!intent.hasExtra(EXTRA_APP) || !intent.hasExtra(EXTRA_APK)) {
    Utils.debugLog(TAG,urlString + "String_Node_Str");
    return START_NOT_STICKY;
  }
  if ((flags & START_FLAG_REDELIVERY) == START_FLAG_REDELIVERY && !DownloaderService.isQueuedOrActive(urlString)) {
    Utils.debugLog(TAG,urlString + "String_Node_Str");
    cancelNotification(urlString);
    return START_NOT_STICKY;
  }
  App app=new App(intent.getParcelableExtra(EXTRA_APP));
  Apk apk=new Apk(intent.getParcelableExtra(EXTRA_APK));
  addToActive(urlString,app,apk);
  Notification notification=createNotification(intent.getDataString(),apk).build();
  notificationManager.notify(urlString.hashCode(),notification);
  registerDownloaderReceivers(urlString);
  File apkFilePath=Utils.getApkDownloadPath(this,intent.getData());
  long apkFileSize=apkFilePath.length();
  if (!apkFilePath.exists() || apkFileSize < apk.size) {
    Utils.debugLog(TAG,"String_Node_Str" + urlString + "String_Node_Str"+ apkFilePath);
    DownloaderService.queue(this,urlString);
  }
 else   if (apkIsCached(apkFilePath,apk)) {
    Utils.debugLog(TAG,"String_Node_Str" + urlString + "String_Node_Str"+ apkFilePath);
    sendBroadcast(intent.getData(),Downloader.ACTION_STARTED,apkFilePath);
    sendBroadcast(intent.getData(),Downloader.ACTION_COMPLETE,apkFilePath);
  }
 else {
    Utils.debugLog(TAG,"String_Node_Str" + urlString + "String_Node_Str"+ apkFilePath);
    apkFilePath.delete();
    DownloaderService.queue(this,urlString);
  }
  return START_REDELIVER_INTENT;
}