Program: 1204
Project: 1204
Buggy source:
private synchronized void notifyTimedEvent(boolean refreshTime){
  long nowUs;
  try {
    nowUs=getCurrentTimeUs(refreshTime,true);
  }
 catch (  IllegalStateException e) {
    mRefresh=true;
    mPausing=true;
    nowUs=getCurrentTimeUs(refreshTime,true);
  }
  long nextTimeUs=nowUs;
  if (DEBUG) {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str").append(mLastTimeUs).append("String_Node_Str").append(nowUs).append("String_Node_Str");
    boolean first=true;
    for (    long time : mTimes) {
      if (time == NO_TIME) {
        continue;
      }
      if (!first)       sb.append("String_Node_Str");
      sb.append(time);
      first=false;
    }
    sb.append("String_Node_Str");
    Log.d(TAG,sb.toString());
  }
  Vector<MediaTimeProvider.OnMediaTimeListener> activatedListeners=new Vector<MediaTimeProvider.OnMediaTimeListener>();
  for (int ix=0; ix < mTimes.length; ix++) {
    if (mListeners[ix] == null) {
      break;
    }
    if (mTimes[ix] <= NO_TIME) {
    }
 else     if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) {
      activatedListeners.add(mListeners[ix]);
      if (DEBUG)       Log.d(TAG,"String_Node_Str");
      mTimes[ix]=NO_TIME;
    }
 else     if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) {
      nextTimeUs=mTimes[ix];
    }
  }
  if (nextTimeUs > nowUs && !mPaused) {
    if (DEBUG)     Log.d(TAG,"String_Node_Str" + nextTimeUs + "String_Node_Str"+ nowUs);
    scheduleNotification(NOTIFY_TIME,nextTimeUs - nowUs);
  }
 else {
    mEventHandler.removeMessages(NOTIFY);
  }
  for (  MediaTimeProvider.OnMediaTimeListener listener : activatedListeners) {
    listener.onTimedEvent(nowUs);
  }
}

Fixed version (ground truth):
private synchronized void notifyTimedEvent(boolean refreshTime){
  long nowUs;
  try {
    nowUs=getCurrentTimeUs(refreshTime,true);
  }
 catch (  IllegalStateException e) {
    mRefresh=true;
    mPausing=true;
    nowUs=getCurrentTimeUs(refreshTime,true);
  }
  long nextTimeUs=nowUs;
  if (mSeeking) {
    return;
  }
  if (DEBUG) {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str").append(mLastTimeUs).append("String_Node_Str").append(nowUs).append("String_Node_Str");
    boolean first=true;
    for (    long time : mTimes) {
      if (time == NO_TIME) {
        continue;
      }
      if (!first)       sb.append("String_Node_Str");
      sb.append(time);
      first=false;
    }
    sb.append("String_Node_Str");
    Log.d(TAG,sb.toString());
  }
  Vector<MediaTimeProvider.OnMediaTimeListener> activatedListeners=new Vector<MediaTimeProvider.OnMediaTimeListener>();
  for (int ix=0; ix < mTimes.length; ix++) {
    if (mListeners[ix] == null) {
      break;
    }
    if (mTimes[ix] <= NO_TIME) {
    }
 else     if (mTimes[ix] <= nowUs + MAX_EARLY_CALLBACK_US) {
      activatedListeners.add(mListeners[ix]);
      if (DEBUG)       Log.d(TAG,"String_Node_Str");
      mTimes[ix]=NO_TIME;
    }
 else     if (nextTimeUs == nowUs || mTimes[ix] < nextTimeUs) {
      nextTimeUs=mTimes[ix];
    }
  }
  if (nextTimeUs > nowUs && !mPaused) {
    if (DEBUG)     Log.d(TAG,"String_Node_Str" + nextTimeUs + "String_Node_Str"+ nowUs);
    scheduleNotification(NOTIFY_TIME,nextTimeUs - nowUs);
  }
 else {
    mEventHandler.removeMessages(NOTIFY);
  }
  for (  MediaTimeProvider.OnMediaTimeListener listener : activatedListeners) {
    listener.onTimedEvent(nowUs);
  }
}