Program: 170604
Project: 170604
Buggy source:
/** 
 * Add the task to the task pool and execute
 * @param task The task to add and
 * @return true if added and executed successfully
 */
public boolean addToTask(final BaseSoterTask task,SoterProcessResultBase instanceOnError){
  if (task == null) {
    SLogger.e(TAG,"String_Node_Str");
    return false;
  }
  if (instanceOnError == null) {
    SLogger.e(TAG,"String_Node_Str");
    return false;
  }
  boolean isEat=task.preExecute();
  if (!isEat) {
    int taskClassIndex=task.hashCode();
    if (!task.isSingleInstance()) {
      SLogger.i(TAG,"String_Node_Str");
synchronized (mTaskPoolLock) {
        sTaskPool.put(taskClassIndex,task);
      }
      SoterTaskThread.getInstance().postToWorker(new Runnable(){
        @Override public void run(){
          task.execute();
        }
      }
);
      return true;
    }
 else {
synchronized (mTaskPoolLock) {
        for (int i=0; i < sTaskPool.size(); i++) {
          int key=sTaskPool.keyAt(i);
          if (sTaskPool.get(key).getClass().getName().equals(task.getClass().getName())) {
            SLogger.w(TAG,"String_Node_Str");
            instanceOnError.setErrCode(ERR_ADD_TASK_FAILED);
            instanceOnError.setErrMsg("String_Node_Str");
            task.callback(instanceOnError);
            return false;
          }
        }
        sTaskPool.put(taskClassIndex,task);
      }
      SoterTaskThread.getInstance().postToWorker(new Runnable(){
        @Override public void run(){
          task.execute();
        }
      }
);
      return true;
    }
  }
 else {
    SLogger.d(TAG,"String_Node_Str");
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Add the task to the task pool and execute
 * @param task The task to add and
 * @return true if added and executed successfully
 */
public boolean addToTask(final BaseSoterTask task,SoterProcessResultBase instanceOnError){
  if (task == null) {
    SLogger.e(TAG,"String_Node_Str");
    return false;
  }
  if (instanceOnError == null) {
    SLogger.e(TAG,"String_Node_Str");
    return false;
  }
  boolean isEat=task.preExecute();
  if (!isEat) {
    int taskClassIndex=task.hashCode();
    if (!task.isSingleInstance()) {
      SLogger.i(TAG,"String_Node_Str");
synchronized (mTaskPoolLock) {
        sTaskPool.put(taskClassIndex,task);
      }
      SoterTaskThread.getInstance().postToWorker(new Runnable(){
        @Override public void run(){
          task.execute();
        }
      }
);
      return true;
    }
 else {
synchronized (mTaskPoolLock) {
        for (int i=0; i < sTaskPool.size(); i++) {
          int key=sTaskPool.keyAt(i);
          if (sTaskPool.get(key) != null && sTaskPool.get(key).getClass().getName().equals(task.getClass().getName())) {
            SLogger.w(TAG,"String_Node_Str");
            instanceOnError.setErrCode(ERR_ADD_TASK_FAILED);
            instanceOnError.setErrMsg("String_Node_Str");
            task.callback(instanceOnError);
            return false;
          }
        }
        sTaskPool.put(taskClassIndex,task);
      }
      SoterTaskThread.getInstance().postToWorker(new Runnable(){
        @Override public void run(){
          task.execute();
        }
      }
);
      return true;
    }
  }
 else {
    SLogger.d(TAG,"String_Node_Str");
    return false;
  }
}