Program: 110006
Project: 110006
Buggy source:
private void startVideo(final String ytvid,final int volume,final String title,boolean recovery){
  eAssert(0 <= volume && volume <= 100);
  setVideoSizeReady(false);
  mStartVideoRecovery.cancel();
  cleanCache(false);
  if (recovery) {
    mErrRetry--;
    if (mErrRetry <= 0) {
      if (Utils.isNetworkAvailable()) {
        if (mVlm.hasNextVideo()) {
          if (mVlm.hasActiveVideo()) {
            Video v=mVlm.getActiveVideo();
            if (DBG) {
              P.w("String_Node_Str");
              P.w("String_Node_Str" + v.ytvid);
              P.w("String_Node_Str" + v.title);
            }
          }
          startNext();
        }
 else         stopPlay(StopState.UNKNOWN_ERROR);
      }
 else       stopPlay(StopState.NETWORK_UNAVAILABLE);
      return;
    }
  }
 else   mErrRetry=PLAYER_ERR_RETRY;
  mpStop();
  mpRelease();
  mpNewInstance();
  mpReset();
  mpSetVolume(volume);
  new Thread(new Runnable(){
    @Override public void run(){
      try {
        mDb.updateVideoTimePlayed(ytvid,System.currentTimeMillis());
      }
 catch (      Exception ignored) {
      }
    }
  }
).start();
  prepareNext();
  Runnable action=new Runnable(){
    @Override public void run(){
      File cachedVid=getCachedVideo(ytvid);
      if (cachedVid.exists() && cachedVid.canRead())       prepareCachedVideo(cachedVid);
 else {
        if (!Utils.isNetworkAvailable())         mStartVideoRecovery.executeRecoveryStart(new Video(ytvid,"String_Node_Str","String_Node_Str",volume,0,0),1000);
 else         prepareVideoStreaming(ytvid);
      }
    }
  }
;
  if (Utils.isPrefHeadTTS()) {
    String text=Utils.getResText(R.string.tts_title_head_pre) + "String_Node_Str" + title+ "String_Node_Str"+ Utils.getResText(R.string.tts_title_head_post);
    ttsSpeak(text,ytvid,action);
  }
 else   action.run();
}

Fixed version (ground truth):
private void startVideo(final String ytvid,final int volume,final String title,boolean recovery){
  eAssert(0 <= volume && volume <= 100);
  setVideoSizeReady(false);
  mStartVideoRecovery.cancel();
  cleanCache(false);
  if (recovery) {
    mErrRetry--;
    if (mErrRetry <= 0) {
      if (Utils.isNetworkAvailable()) {
        if (mVlm.hasNextVideo()) {
          if (mVlm.hasActiveVideo()) {
            Video v=mVlm.getActiveVideo();
            if (DBG) {
              P.w("String_Node_Str");
              P.w("String_Node_Str" + v.ytvid);
              P.w("String_Node_Str" + v.title);
            }
          }
          startNext();
        }
 else         stopPlay(StopState.UNKNOWN_ERROR);
      }
 else       stopPlay(StopState.NETWORK_UNAVAILABLE);
      return;
    }
  }
 else   mErrRetry=PLAYER_ERR_RETRY;
  if (null != mYtHack)   mYtHack.forceCancel();
  mpStop();
  mpRelease();
  mpNewInstance();
  mpReset();
  mpSetVolume(volume);
  new Thread(new Runnable(){
    @Override public void run(){
      try {
        mDb.updateVideoTimePlayed(ytvid,System.currentTimeMillis());
      }
 catch (      Exception ignored) {
      }
    }
  }
).start();
  prepareNext();
  Runnable action=new Runnable(){
    @Override public void run(){
      File cachedVid=getCachedVideo(ytvid);
      if (cachedVid.exists() && cachedVid.canRead())       prepareCachedVideo(cachedVid);
 else {
        if (!Utils.isNetworkAvailable())         mStartVideoRecovery.executeRecoveryStart(new Video(ytvid,"String_Node_Str","String_Node_Str",volume,0,0),1000);
 else         prepareVideoStreaming(ytvid);
      }
    }
  }
;
  if (Utils.isPrefHeadTTS()) {
    String text=Utils.getResText(R.string.tts_title_head_pre) + "String_Node_Str" + title+ "String_Node_Str"+ Utils.getResText(R.string.tts_title_head_post);
    ttsSpeak(text,ytvid,action);
  }
 else   action.run();
}