Program: 103855
Project: 103855
Buggy source:
/** 
 * Adds a <tt>ReceiveStream</tt> to this <tt>MediaDeviceSession</tt> to be played back on the associated <tt>MediaDevice</tt> and a specific <tt>DataSource</tt> is to be used to access its media data during the playback. The <tt>DataSource</tt> is explicitly specified in order to allow extenders to override the <tt>DataSource</tt> of the <tt>ReceiveStream</tt> (e.g. create a clone of it).
 * @param receiveStream the <tt>ReceiveStream</tt> to be played back by this<tt>MediaDeviceSession</tt> on its associated <tt>MediaDevice</tt>
 * @param receiveStreamDataSource the <tt>DataSource</tt> to be used foraccessing the media data of <tt>receiveStream</tt> during its playback
 */
protected void addReceiveStream(ReceiveStream receiveStream,DataSource receiveStreamDataSource){
  if (receiveStreamDataSource == null)   return;
  receiveStreams.put(receiveStream,receiveStreamDataSource);
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + receiveStream.getSSRC());
synchronized (players) {
    Processor player=players.get(receiveStreamDataSource);
    if (player == null) {
      Throwable exception=null;
      try {
        player=Manager.createProcessor(receiveStreamDataSource);
      }
 catch (      IOException ioe) {
        exception=ioe;
      }
catch (      NoPlayerException npe) {
        exception=npe;
      }
      if (exception != null)       logger.error("String_Node_Str" + "String_Node_Str" + receiveStream.getSSRC(),exception);
 else       if (!waitForState(player,Processor.Configured))       logger.error("String_Node_Str" + "String_Node_Str" + receiveStream.getSSRC());
 else {
        player.setContentDescriptor(null);
        if (waitForState(player,Processor.Realized)) {
          player.start();
          realizeComplete(player);
          if (logger.isTraceEnabled())           logger.trace("String_Node_Str" + player.hashCode() + "String_Node_Str"+ receiveStream.getSSRC());
          players.put(receiveStreamDataSource,player);
        }
 else         logger.error("String_Node_Str" + "String_Node_Str" + receiveStream.getSSRC());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds a <tt>ReceiveStream</tt> to this <tt>MediaDeviceSession</tt> to be played back on the associated <tt>MediaDevice</tt> and a specific <tt>DataSource</tt> is to be used to access its media data during the playback. The <tt>DataSource</tt> is explicitly specified in order to allow extenders to override the <tt>DataSource</tt> of the <tt>ReceiveStream</tt> (e.g. create a clone of it).
 * @param receiveStream the <tt>ReceiveStream</tt> to be played back by this<tt>MediaDeviceSession</tt> on its associated <tt>MediaDevice</tt>
 * @param receiveStreamDataSource the <tt>DataSource</tt> to be used foraccessing the media data of <tt>receiveStream</tt> during its playback
 */
protected synchronized void addReceiveStream(ReceiveStream receiveStream,DataSource receiveStreamDataSource){
  if (receiveStreamDataSource == null)   return;
  receiveStreams.put(receiveStream,receiveStreamDataSource);
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + receiveStream.getSSRC());
synchronized (players) {
    Processor player=players.get(receiveStreamDataSource);
    if (player == null) {
      Throwable exception=null;
      try {
        player=Manager.createProcessor(receiveStreamDataSource);
      }
 catch (      IOException ioe) {
        exception=ioe;
      }
catch (      NoPlayerException npe) {
        exception=npe;
      }
      if (exception != null)       logger.error("String_Node_Str" + "String_Node_Str" + receiveStream.getSSRC(),exception);
 else       if (!waitForState(player,Processor.Configured))       logger.error("String_Node_Str" + "String_Node_Str" + receiveStream.getSSRC());
 else {
        player.setContentDescriptor(null);
        if (waitForState(player,Processor.Realized)) {
          player.start();
          realizeComplete(player);
          if (logger.isTraceEnabled())           logger.trace("String_Node_Str" + player.hashCode() + "String_Node_Str"+ receiveStream.getSSRC());
          players.put(receiveStreamDataSource,player);
        }
 else         logger.error("String_Node_Str" + "String_Node_Str" + receiveStream.getSSRC());
      }
    }
  }
}