Program: 162368
Project: 162368
Buggy source:
/** 
 * Run in main thread
 * @param msg call messages
 */
@Override public void handleMessage(Message msg){
  if (msg.what == ASYNC) {
    boolean rescheduled=false;
    try {
      long started=SystemClock.uptimeMillis();
      while (true) {
        Runnable runnable=mAsyncPool.poll();
        if (runnable == null) {
synchronized (mAsyncPool) {
            runnable=mAsyncPool.poll();
            if (runnable == null) {
              isAsyncActive=false;
              return;
            }
          }
        }
        runnable.run();
        long timeInMethod=SystemClock.uptimeMillis() - started;
        if (timeInMethod >= mMaxMillisInsideHandleMessage) {
          if (!sendMessage(obtainMessage(ASYNC))) {
            throw new GeniusException("String_Node_Str");
          }
          rescheduled=true;
          return;
        }
      }
    }
  finally {
      isAsyncActive=rescheduled;
    }
  }
 else   if (msg.what == SYNC) {
    boolean rescheduled=false;
    try {
      long started=SystemClock.uptimeMillis();
      while (true) {
        UiKitSyncPost post=mSyncPool.poll();
        if (post == null) {
synchronized (mSyncPool) {
            post=mSyncPool.poll();
            if (post == null) {
              isSyncActive=false;
              return;
            }
          }
        }
        post.run();
        long timeInMethod=SystemClock.uptimeMillis() - started;
        if (timeInMethod >= mMaxMillisInsideHandleMessage) {
          if (!sendMessage(obtainMessage(SYNC))) {
            throw new GeniusException("String_Node_Str");
          }
          rescheduled=true;
          return;
        }
      }
    }
  finally {
      isSyncActive=rescheduled;
    }
  }
 else   super.handleMessage(msg);
}

Fixed version (ground truth):
/** 
 * Run in main thread
 * @param msg call messages
 */
@Override public void handleMessage(Message msg){
  if (msg.what == ASYNC) {
    boolean rescheduled=false;
    try {
      long started=SystemClock.uptimeMillis();
      while (true) {
        Runnable runnable=poolAsyncPost();
        if (runnable == null) {
synchronized (mAsyncPool) {
            runnable=poolAsyncPost();
            if (runnable == null) {
              isAsyncActive=false;
              return;
            }
          }
        }
        runnable.run();
        long timeInMethod=SystemClock.uptimeMillis() - started;
        if (timeInMethod >= mMaxMillisInsideHandleMessage) {
          if (!sendMessage(obtainMessage(ASYNC))) {
            throw new GeniusException("String_Node_Str");
          }
          rescheduled=true;
          return;
        }
      }
    }
  finally {
      isAsyncActive=rescheduled;
    }
  }
 else   if (msg.what == SYNC) {
    boolean rescheduled=false;
    try {
      long started=SystemClock.uptimeMillis();
      while (true) {
        UiKitSyncPost post=poolSyncPost();
        if (post == null) {
synchronized (mSyncPool) {
            post=poolSyncPost();
            if (post == null) {
              isSyncActive=false;
              return;
            }
          }
        }
        post.run();
        long timeInMethod=SystemClock.uptimeMillis() - started;
        if (timeInMethod >= mMaxMillisInsideHandleMessage) {
          if (!sendMessage(obtainMessage(SYNC))) {
            throw new GeniusException("String_Node_Str");
          }
          rescheduled=true;
          return;
        }
      }
    }
  finally {
      isSyncActive=rescheduled;
    }
  }
 else   super.handleMessage(msg);
}