Program: 34142
Project: 34142
Buggy source:
@Override public void handleMessage(Message msg){
  try {
    VideoActivity player=videoActivity.get();
    if (msg.what == videoSizeChanged) {
      player.setSize(msg.arg1,msg.arg2);
      return;
    }
    Bundle bundle=msg.getData();
    int event=bundle.getInt("String_Node_Str");
switch (event) {
case EventHandler.MediaPlayerEndReached:
      player.restartPlay(player.mrlPlaying);
    break;
case EventHandler.MediaPlayerPlaying:
  player.surfaceView.setVisibility(View.VISIBLE);
player.imageView.setVisibility(View.GONE);
player.mrlPlaying=player.getCurrentMRL();
break;
case EventHandler.MediaPlayerPaused:
break;
case EventHandler.MediaPlayerStopped:
break;
case EventHandler.MediaPlayerEncounteredError:
Log.v(TAG,"String_Node_Str");
if (evercamCamera != null) {
player.loadImageFromCache(evercamCamera.getCameraId());
}
if (player.mrlPlaying == null && player.isNextMRLValid()) {
player.restartPlay(player.getNextMRL());
}
 else if (player.mrlPlaying != null) {
player.restartPlay(player.mrlPlaying);
}
 else {
player.showToast(videoActivity.get().getString(R.string.msg_switch_to_jpg));
player.showImagesVideo=true;
player.createNewImageThread();
}
break;
case EventHandler.MediaPlayerVout:
Log.v(TAG,"String_Node_Str");
player.hideProgressView();
try {
if (VideoActivity.mediaUrls.get(mrlIndex).isLocalNetwork == false) {
SharedPreferences sharedPrefs=PreferenceManager.getDefaultSharedPreferences(player);
SharedPreferences.Editor editor=sharedPrefs.edit();
editor.putString("String_Node_Str" + evercamCamera.getCameraId(),player.mrlPlaying);
editor.commit();
}
}
 catch (Exception ex) {
}
break;
default :
break;
}
}
 catch (Exception e) {
Log.e(TAG,e.getMessage());
}
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
  try {
    VideoActivity player=videoActivity.get();
    if (msg.what == videoSizeChanged) {
      player.setSize(msg.arg1,msg.arg2);
      return;
    }
    Bundle bundle=msg.getData();
    int event=bundle.getInt("String_Node_Str");
switch (event) {
case EventHandler.MediaPlayerEndReached:
      player.restartPlay(player.mrlPlaying);
    break;
case EventHandler.MediaPlayerPlaying:
  isPlayingJpg=false;
player.surfaceView.setVisibility(View.VISIBLE);
player.imageView.setVisibility(View.GONE);
player.mrlPlaying=player.getCurrentMRL();
break;
case EventHandler.MediaPlayerPaused:
break;
case EventHandler.MediaPlayerStopped:
break;
case EventHandler.MediaPlayerEncounteredError:
Log.v(TAG,"String_Node_Str");
if (evercamCamera != null) {
player.loadImageFromCache(evercamCamera.getCameraId());
}
if (player.mrlPlaying == null && player.isNextMRLValid()) {
player.restartPlay(player.getNextMRL());
}
 else if (player.mrlPlaying != null) {
player.restartPlay(player.mrlPlaying);
}
 else {
isPlayingJpg=true;
player.showToast(videoActivity.get().getString(R.string.msg_switch_to_jpg));
player.showImagesVideo=true;
player.createNewImageThread();
}
break;
case EventHandler.MediaPlayerVout:
Log.v(TAG,"String_Node_Str");
player.hideProgressView();
try {
if (VideoActivity.mediaUrls.get(mrlIndex).isLocalNetwork == false) {
SharedPreferences sharedPrefs=PreferenceManager.getDefaultSharedPreferences(player);
SharedPreferences.Editor editor=sharedPrefs.edit();
editor.putString("String_Node_Str" + evercamCamera.getCameraId(),player.mrlPlaying);
editor.commit();
}
}
 catch (Exception ex) {
}
break;
default :
break;
}
}
 catch (Exception e) {
Log.e(TAG,e.getMessage());
}
}