Program: 130190
Project: 130190
Buggy source:
@Override public void run(){
  final int obj_id=download_manager.obj_id;
  final NotificationServiceBar notification_service_bar=new NotificationServiceBar(getApplicationContext(),DownloadService.this);
  if (get_download_store(download_manager.obj_id) == null) {
    notification_service_bar.wait_notification(download_manager,notice_id);
  }
  save_download_manager(download_manager);
  new AsyncTask<Void,FileDownloader,Void>(){
    @Override protected Void doInBackground(    Void... objects){
      try {
        download_manager.init_connection(context);
        file_size=download_manager.file_size;
        download_manager.save_thread_data();
        download_manager.is_finished=false;
        while (!download_manager.is_finished) {
          Thread.sleep(900);
          if (get_download_store(obj_id).should_stop) {
            download_manager.should_stop=true;
            Log.i("String_Node_Str","String_Node_Str");
            return null;
          }
 else {
            Log.i("String_Node_Str","String_Node_Str");
          }
          if (get_download_store(obj_id).should_pause) {
            download_manager.should_pause=true;
            Log.i("String_Node_Str","String_Node_Str");
            return null;
          }
 else {
            Log.i("String_Node_Str","String_Node_Str");
          }
          download_manager.is_finished=true;
          download_manager.continue_download_with_thread();
          notification_service_bar.handle_notification(download_manager,notice_id);
          if (download_manager.listener != null) {
            Log.i("String_Node_Str","String_Node_Str");
            publishProgress(download_manager);
          }
        }
        return null;
      }
 catch (      Exception e) {
        Log.i("String_Node_Str",e.toString());
        e.printStackTrace();
      }
      return null;
    }
    @Override protected void onProgressUpdate(    FileDownloader... result){
      FileDownloader download_manager=result[0];
      Log.i("String_Node_Str",Thread.currentThread().toString());
      Intent in=new Intent("String_Node_Str");
      Log.i("String_Node_Str",Integer.toString(download_manager.file_size));
      in.putExtra("String_Node_Str",download_manager);
      getApplicationContext().sendBroadcast(in);
      download_manager.listener.on_update(download_manager.downloaded_size);
    }
    @Override protected void onPostExecute(    Void result){
      if (download_manager.should_stop) {
        Log.i("String_Node_Str","String_Node_Str");
        clear_notice_bar(notice_id);
        clear_local_thread_data(download_manager);
        stop_service();
        return;
      }
      if (download_manager.should_pause) {
        Log.i("String_Node_Str","String_Node_Str");
        return;
      }
      build_download_done_notification(download_manager);
      clear_notice_bar(notice_id);
      clear_local_thread_data(download_manager);
      stop_service();
    }
  }
.execute();
}

Fixed version (ground truth):
@Override public void run(){
  final int obj_id=download_manager.get_obj_id();
  final NotificationServiceBar notification_service_bar=new NotificationServiceBar(getApplicationContext(),DownloadService.this);
  if (get_download_store(download_manager.get_obj_id()) == null) {
    notification_service_bar.wait_notification(download_manager,notice_id);
  }
  save_download_manager(download_manager);
  new AsyncTask<Void,FileDownloader,Void>(){
    @Override protected Void doInBackground(    Void... objects){
      try {
        download_manager.init_connection(context);
        file_size=download_manager.file_size;
        download_manager.save_thread_data();
        download_manager.is_finished=false;
        while (!download_manager.is_finished) {
          Thread.sleep(900);
          if (get_download_store(obj_id).should_stop) {
            download_manager.should_stop=true;
            Log.i("String_Node_Str","String_Node_Str");
            return null;
          }
 else {
            Log.i("String_Node_Str","String_Node_Str");
          }
          if (get_download_store(obj_id).should_pause) {
            download_manager.should_pause=true;
            Log.i("String_Node_Str","String_Node_Str");
            return null;
          }
 else {
            Log.i("String_Node_Str","String_Node_Str");
          }
          download_manager.is_finished=true;
          download_manager.continue_download_with_thread();
          notification_service_bar.handle_notification(download_manager,notice_id);
          if (download_manager.listener != null) {
            Log.i("String_Node_Str","String_Node_Str");
            publishProgress(download_manager);
          }
        }
        return null;
      }
 catch (      Exception e) {
        Log.i("String_Node_Str",e.toString());
        e.printStackTrace();
      }
      return null;
    }
    @Override protected void onProgressUpdate(    FileDownloader... result){
      FileDownloader download_manager=result[0];
      Log.i("String_Node_Str",Thread.currentThread().toString());
      Intent in=new Intent("String_Node_Str");
      Log.i("String_Node_Str",Integer.toString(download_manager.file_size));
      in.putExtra("String_Node_Str",download_manager);
      getApplicationContext().sendBroadcast(in);
      download_manager.listener.on_update(download_manager.downloaded_size);
    }
    @Override protected void onPostExecute(    Void result){
      if (download_manager.should_stop) {
        Log.i("String_Node_Str","String_Node_Str");
        clear_notice_bar(notice_id);
        clear_local_thread_data(download_manager);
        stop_service();
        return;
      }
      if (download_manager.should_pause) {
        Log.i("String_Node_Str","String_Node_Str");
        return;
      }
      build_download_done_notification(download_manager);
      clear_notice_bar(notice_id);
      clear_local_thread_data(download_manager);
      stop_service();
    }
  }
.execute();
}