Program: 93742
Project: 93742
Buggy source:
public void startPlaying(RadioActivity view,RadioDetails radioDetails){
  caller=view;
  RadioApplication radioApplication=(RadioApplication)getApplicationContext();
  MediaPlayer mediaPlayer=radioApplication.getMediaPlayer();
  try {
    if (mediaPlayer == null) {
      mediaPlayer=new MediaPlayer();
    }
    mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){
      public void onCompletion(      MediaPlayer mediaPlayer){
        if (mediaPlayer.isPlaying()) {
          mediaPlayer.start();
        }
      }
    }
);
    mediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener(){
      public boolean onError(      MediaPlayer mediaPlayer,      int i,      int i1){
        Log.e(TAG,"String_Node_Str");
        caller.updateUIForPlaying(false,"String_Node_Str");
        return true;
      }
    }
);
    if (radioDetails.getPlaylistUrl().endsWith("String_Node_Str") || radioDetails.getPlaylistUrl().endsWith("String_Node_Str")) {
      if (radioDetails.getPlaylistUrl().endsWith("String_Node_Str")) {
        radioDetails=PlsHandler.parse(radioDetails);
      }
 else {
        radioDetails=M3uHandler.parse(radioDetails);
      }
    }
 else {
      radioDetails.setStreamUrl(radioDetails.getPlaylistUrl());
    }
    mediaPlayer.setDataSource(radioDetails.getStreamUrl());
    mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
    mediaPlayer.prepareAsync();
    final RadioDetails radioDetailsToPlay=radioDetails;
    mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener(){
      public void onPrepared(      MediaPlayer mediaPlayer){
        mediaPlayer.start();
        StringBuilder status=new StringBuilder(getString(R.string.playing_string));
        if (!StringUtils.IsNullOrEmpty(radioDetailsToPlay.getStationName())) {
          status.append("String_Node_Str").append(radioDetailsToPlay.getStationName());
        }
        caller.updateUIForPlaying(true,status.toString());
        NotificationHelper.showNotification(getApplicationContext(),NotificationHelper.NOTIFICATION_PLAYING_ID,radioDetailsToPlay,status.toString(),status.toString());
      }
    }
);
  }
 catch (  IOException ioe) {
    Log.e(TAG,"String_Node_Str",ioe);
    ioe.printStackTrace();
    mediaPlayer.reset();
  }
 finally {
    radioApplication.setMediaPlayer(mediaPlayer);
    radioApplication.setPlayingStation(radioDetails);
  }
}

Fixed version (ground truth):
public void startPlaying(RadioActivity view,RadioDetails radioDetails){
  caller=view;
  RadioApplication radioApplication=(RadioApplication)getApplicationContext();
  MediaPlayer mediaPlayer=radioApplication.getMediaPlayer();
  try {
    if (mediaPlayer == null) {
      mediaPlayer=new MediaPlayer();
    }
    mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){
      public void onCompletion(      MediaPlayer mediaPlayer){
        if (mediaPlayer.isPlaying()) {
          mediaPlayer.start();
        }
      }
    }
);
    mediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener(){
      public boolean onError(      MediaPlayer mediaPlayer,      int i,      int i1){
        Log.e(TAG,"String_Node_Str");
        caller.updateUIForPlaying(false,"String_Node_Str");
        return true;
      }
    }
);
    if (radioDetails.getPlaylistUrl().endsWith("String_Node_Str") || radioDetails.getPlaylistUrl().endsWith("String_Node_Str")) {
      if (radioDetails.getPlaylistUrl().endsWith("String_Node_Str")) {
        radioDetails=PlsHandler.parse(radioDetails);
      }
 else {
        radioDetails=M3uHandler.parse(radioDetails);
      }
    }
 else {
      radioDetails.setStreamUrl(radioDetails.getPlaylistUrl());
    }
    if (buffering) {
      Log.d(TAG,"String_Node_Str");
      mediaPlayer.reset();
      buffering=false;
    }
    mediaPlayer.setDataSource(radioDetails.getStreamUrl());
    mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
    mediaPlayer.prepareAsync();
    buffering=true;
    final RadioDetails radioDetailsToPlay=radioDetails;
    mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener(){
      public void onPrepared(      MediaPlayer mediaPlayer){
        mediaPlayer.start();
        buffering=false;
        StringBuilder status=new StringBuilder(getString(R.string.playing_string));
        if (!StringUtils.IsNullOrEmpty(radioDetailsToPlay.getStationName())) {
          status.append("String_Node_Str").append(radioDetailsToPlay.getStationName());
        }
        caller.updateUIForPlaying(true,status.toString());
        NotificationHelper.showNotification(getApplicationContext(),NotificationHelper.NOTIFICATION_PLAYING_ID,radioDetailsToPlay,status.toString(),status.toString());
      }
    }
);
  }
 catch (  IOException ioe) {
    Log.e(TAG,"String_Node_Str",ioe);
    ioe.printStackTrace();
    mediaPlayer.reset();
  }
 finally {
    radioApplication.setMediaPlayer(mediaPlayer);
    radioApplication.setPlayingStation(radioDetails);
  }
}