Program: 6883
Project: 6883
Buggy source:
/** 
 * Passing streamId = null is the same as passing the currently playing stream
 */
public synchronized void play(String streamId){
  if (streamId == null)   streamId=currentStreamId;
  if (streamId.equals(currentStreamId) && player != null) {
    try {
      player.play();
      status=Status.Starting;
    }
 catch (    IOException e) {
      log.error("String_Node_Str",e);
    }
    tracks.notifyPlayingTrackChange(currentStreamId);
    event.firePlaybackStarted();
    return;
  }
  if (player != null) {
    String stoppedStreamId=currentStreamId;
    player.stop();
    currentStreamId=null;
    player=null;
    event.fireTrackUpdated(stoppedStreamId);
  }
  currentStreamId=streamId;
  Track t=tracks.getTrack(currentStreamId);
  if (t instanceof CloudTrack) {
    try {
      download.addDownload(currentStreamId);
    }
 catch (    RobonoboException e) {
      log.error("String_Node_Str",e);
      return;
    }
    t=download.getDownload(currentStreamId);
  }
  if (t instanceof DownloadingTrack) {
    DownloadingTrack d=(DownloadingTrack)t;
    if (d.getDownloadStatus() == DownloadStatus.Paused) {
      try {
        download.startDownload(currentStreamId);
      }
 catch (      RobonoboException e) {
        log.error("String_Node_Str",e);
        return;
      }
    }
    download.updatePriorities();
    mina.setStreamVelocity(currentStreamId,StreamVelocity.MaxRate);
    mina.setAllStreamVelocitiesExcept(currentStreamId,StreamVelocity.LowestCost);
  }
  PageBuffer pb=rbnb.getStorageService().getPageBuf(currentStreamId);
  if (pb == null)   throw new Errot();
  status=Status.Buffering;
  event.firePlaybackStarting();
  Stream s=streams.getKnownStream(currentStreamId);
  if (bufferedEnough(s,pb))   startPlaying(s,pb);
 else {
    tracks.notifyPlayingTrackChange(currentStreamId);
    pb.addListener(this);
  }
}

Fixed version (ground truth):
/** 
 * Passing streamId = null is the same as passing the currently playing stream 
 */
public synchronized void play(String streamId){
  if (streamId == null)   streamId=currentStreamId;
  if (streamId.equals(currentStreamId) && player != null) {
    try {
      player.play();
      status=Status.Starting;
    }
 catch (    IOException e) {
      log.error("String_Node_Str",e);
    }
    tracks.notifyPlayingTrackChange(currentStreamId);
    event.firePlaybackStarted();
    return;
  }
  if (player != null) {
    String stoppedStreamId=currentStreamId;
    player.stop();
    currentStreamId=null;
    player=null;
    event.fireTrackUpdated(stoppedStreamId);
  }
  currentStreamId=streamId;
  Track t=tracks.getTrack(currentStreamId);
  if (t instanceof CloudTrack) {
    try {
      download.addDownload(currentStreamId);
    }
 catch (    RobonoboException e) {
      log.error("String_Node_Str",e);
      return;
    }
    t=download.getDownload(currentStreamId);
  }
  if (t instanceof DownloadingTrack) {
    DownloadingTrack d=(DownloadingTrack)t;
    if (d.getDownloadStatus() == DownloadStatus.Paused) {
      try {
        download.startDownload(currentStreamId);
      }
 catch (      RobonoboException e) {
        log.error("String_Node_Str",e);
        return;
      }
    }
    download.updatePriorities();
    mina.setStreamVelocity(currentStreamId,StreamVelocity.MaxRate);
    mina.setAllStreamVelocitiesExcept(currentStreamId,StreamVelocity.LowestCost);
  }
  PageBuffer pb=rbnb.getStorageService().getPageBuf(currentStreamId);
  if (pb == null)   throw new Errot();
  status=Status.Buffering;
  event.firePlaybackStarting();
  Stream s=streams.getKnownStream(currentStreamId);
  if (bufferedEnough(s,pb))   startPlaying(s,pb);
 else {
    tracks.notifyPlayingTrackChange(currentStreamId);
    pb.addListener(this);
  }
}