Program: 191912
Project: 191912
Buggy source:
/** 
 * Call to re-create the Loader associated with a particular ID.  If there is currently a Loader associated with this ID, it will be canceled/stopped/destroyed as appropriate.  A new Loader with the given arguments will be created and its data delivered to you once available. <p>This function does some throttling of Loaders.  If too many Loaders have been created for the given ID but not yet generated their data, new calls to this function will create and return a new Loader but not actually start it until some previous loaders have completed. <p>After calling this function, any previous Loaders associated with this ID will be considered invalid, and you will receive no further data updates from them.
 * @param id A unique (to this LoaderManager instance) identifier underwhich to manage the new Loader.
 * @param args Optional arguments that will be propagated to{@link LoaderCallbacks#onCreateLoader(int,Bundle) LoaderCallbacks.onCreateLoader()}.
 * @param callback Interface implementing management of this Loader.  Required.Its onCreateLoader() method will be called while inside of the function to instantiate the Loader object.
 */
@SuppressWarnings("String_Node_Str") public <D>Loader<D> restartLoader(int id,Bundle args,LoaderManager.LoaderCallbacks<D> callback){
  if (mCreatingLoader) {
    throw new IllegalStateException("String_Node_Str");
  }
  LoaderInfo info=mLoaders.get(id);
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this + "String_Node_Str"+ args);
  if (info != null) {
    LoaderInfo inactive=mInactiveLoaders.get(id);
    if (inactive != null) {
      if (info.mHaveData) {
        if (DEBUG)         Log.v(TAG,"String_Node_Str" + info);
        inactive.mDeliveredData=false;
        inactive.destroy();
        info.mLoader.abandon();
        mInactiveLoaders.put(id,info);
      }
 else {
        if (!info.mStarted) {
          if (DEBUG)           Log.v(TAG,"String_Node_Str");
          mLoaders.put(id,null);
          info.destroy();
        }
 else {
          if (DEBUG)           Log.v(TAG,"String_Node_Str");
          info.cancel();
          if (info.mPendingLoader != null) {
            if (DEBUG)             Log.v(TAG,"String_Node_Str" + info.mPendingLoader);
            info.mPendingLoader.destroy();
            info.mPendingLoader=null;
          }
          if (DEBUG)           Log.v(TAG,"String_Node_Str");
          info.mPendingLoader=createLoader(id,args,(LoaderManager.LoaderCallbacks<Object>)callback);
          return (Loader<D>)info.mPendingLoader.mLoader;
        }
      }
    }
 else {
      if (DEBUG)       Log.v(TAG,"String_Node_Str" + info);
      info.mLoader.abandon();
      mInactiveLoaders.put(id,info);
    }
  }
  info=createAndInstallLoader(id,args,(LoaderManager.LoaderCallbacks<Object>)callback);
  return (Loader<D>)info.mLoader;
}

Fixed version (ground truth):
/** 
 * Call to re-create the Loader associated with a particular ID.  If there is currently a Loader associated with this ID, it will be canceled/stopped/destroyed as appropriate.  A new Loader with the given arguments will be created and its data delivered to you once available. <p>This function does some throttling of Loaders.  If too many Loaders have been created for the given ID but not yet generated their data, new calls to this function will create and return a new Loader but not actually start it until some previous loaders have completed. <p>After calling this function, any previous Loaders associated with this ID will be considered invalid, and you will receive no further data updates from them.
 * @param id A unique (to this LoaderManager instance) identifier underwhich to manage the new Loader.
 * @param args Optional arguments that will be propagated to{@link LoaderCallbacks#onCreateLoader(int,Bundle) LoaderCallbacks.onCreateLoader()}.
 * @param callback Interface implementing management of this Loader.  Required.Its onCreateLoader() method will be called while inside of the function to instantiate the Loader object.
 */
@SuppressWarnings("String_Node_Str") public <D>Loader<D> restartLoader(int id,Bundle args,LoaderManager.LoaderCallbacks<D> callback){
  if (mCreatingLoader) {
    throw new IllegalStateException("String_Node_Str");
  }
  LoaderInfo info=mLoaders.get(id);
  if (DEBUG)   Log.v(TAG,"String_Node_Str" + this + "String_Node_Str"+ args);
  if (info != null) {
    LoaderInfo inactive=mInactiveLoaders.get(id);
    if (inactive != null) {
      if (info.mHaveData) {
        if (DEBUG)         Log.v(TAG,"String_Node_Str" + info);
        inactive.mDeliveredData=false;
        inactive.destroy();
        info.mLoader.abandon();
        mInactiveLoaders.put(id,info);
      }
 else {
        if (!info.cancel()) {
          if (DEBUG)           Log.v(TAG,"String_Node_Str");
          mLoaders.put(id,null);
          info.destroy();
        }
 else {
          if (DEBUG)           Log.v(TAG,"String_Node_Str");
          if (info.mPendingLoader != null) {
            if (DEBUG)             Log.v(TAG,"String_Node_Str" + info.mPendingLoader);
            info.mPendingLoader.destroy();
            info.mPendingLoader=null;
          }
          if (DEBUG)           Log.v(TAG,"String_Node_Str");
          info.mPendingLoader=createLoader(id,args,(LoaderManager.LoaderCallbacks<Object>)callback);
          return (Loader<D>)info.mPendingLoader.mLoader;
        }
      }
    }
 else {
      if (DEBUG)       Log.v(TAG,"String_Node_Str" + info);
      info.mLoader.abandon();
      mInactiveLoaders.put(id,info);
    }
  }
  info=createAndInstallLoader(id,args,(LoaderManager.LoaderCallbacks<Object>)callback);
  return (Loader<D>)info.mLoader;
}