Program: 103846
Project: 103846
Buggy source:
/** 
 * Creates new <tt>SendStream</tt> instances for the streams of  {@link #device} through {@link #rtpManager}.
 */
private void createSendStreams(){
  RTPManager rtpManager=getRTPManager();
  MediaDeviceSession deviceSession=getDeviceSession();
  DataSource dataSource=deviceSession.getOutputDataSource();
  int streamCount;
  if (dataSource instanceof PushBufferDataSource) {
    PushBufferStream[] streams=((PushBufferDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   if (dataSource instanceof PushDataSource) {
    PushSourceStream[] streams=((PushDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   if (dataSource instanceof PullBufferDataSource) {
    PullBufferStream[] streams=((PullBufferDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   if (dataSource instanceof PullDataSource) {
    PullSourceStream[] streams=((PullDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   streamCount=(dataSource == null) ? 0 : 1;
  for (int streamIndex=0; streamIndex < streamCount; streamIndex++) {
    Throwable exception=null;
    try {
      SendStream sendStream=rtpManager.createSendStream(dataSource,streamIndex);
      if (logger.isTraceEnabled())       logger.trace("String_Node_Str" + "String_Node_Str" + sendStream.hashCode() + "String_Node_Str"+ toString(dataSource)+ "String_Node_Str"+ streamIndex+ "String_Node_Str"+ rtpManager.hashCode());
    }
 catch (    IOException ioe) {
      exception=ioe;
    }
catch (    UnsupportedFormatException ufe) {
      exception=ufe;
    }
    if (exception != null) {
      logger.error("String_Node_Str" + dataSource + "String_Node_Str"+ streamIndex,exception);
    }
  }
  sendStreamsAreCreated=true;
  if (logger.isTraceEnabled()) {
    @SuppressWarnings("String_Node_Str") Vector<SendStream> sendStreams=rtpManager.getSendStreams();
    int sendStreamCount=(sendStreams == null) ? 0 : sendStreams.size();
    logger.trace("String_Node_Str" + rtpManager.hashCode() + "String_Node_Str"+ sendStreamCount);
  }
  if (deviceSessionPropertyChangeListener == null)   deviceSessionPropertyChangeListener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent event){
      if (MediaDeviceSession.OUTPUT_DATA_SOURCE.equals(event.getPropertyName()))       deviceSessionOutputDataSourceChanged();
 else       if (MediaDeviceSession.SSRC_LIST.equals(event.getPropertyName()))       deviceSessionSsrcListChanged(event);
    }
  }
;
  deviceSession.addPropertyChangeListener(deviceSessionPropertyChangeListener);
}

Fixed version (ground truth):
/** 
 * Creates new <tt>SendStream</tt> instances for the streams of  {@link #deviceSession} through {@link #rtpManager}.
 */
private void createSendStreams(){
  RTPManager rtpManager=getRTPManager();
  MediaDeviceSession deviceSession=getDeviceSession();
  DataSource dataSource=deviceSession.getOutputDataSource();
  int streamCount;
  if (dataSource instanceof PushBufferDataSource) {
    PushBufferStream[] streams=((PushBufferDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   if (dataSource instanceof PushDataSource) {
    PushSourceStream[] streams=((PushDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   if (dataSource instanceof PullBufferDataSource) {
    PullBufferStream[] streams=((PullBufferDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   if (dataSource instanceof PullDataSource) {
    PullSourceStream[] streams=((PullDataSource)dataSource).getStreams();
    streamCount=(streams == null) ? 0 : streams.length;
  }
 else   streamCount=(dataSource == null) ? 0 : 1;
  for (int streamIndex=0; streamIndex < streamCount; streamIndex++) {
    Throwable exception=null;
    try {
      SendStream sendStream=rtpManager.createSendStream(dataSource,streamIndex);
      if (logger.isTraceEnabled())       logger.trace("String_Node_Str" + "String_Node_Str" + sendStream.hashCode() + "String_Node_Str"+ toString(dataSource)+ "String_Node_Str"+ streamIndex+ "String_Node_Str"+ rtpManager.hashCode());
    }
 catch (    IOException ioe) {
      exception=ioe;
    }
catch (    UnsupportedFormatException ufe) {
      exception=ufe;
    }
    if (exception != null) {
      logger.error("String_Node_Str" + dataSource + "String_Node_Str"+ streamIndex,exception);
    }
  }
  sendStreamsAreCreated=true;
  if (logger.isTraceEnabled()) {
    @SuppressWarnings("String_Node_Str") Vector<SendStream> sendStreams=rtpManager.getSendStreams();
    int sendStreamCount=(sendStreams == null) ? 0 : sendStreams.size();
    logger.trace("String_Node_Str" + rtpManager.hashCode() + "String_Node_Str"+ sendStreamCount);
  }
  if (deviceSessionPropertyChangeListener == null)   deviceSessionPropertyChangeListener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent event){
      if (MediaDeviceSession.OUTPUT_DATA_SOURCE.equals(event.getPropertyName()))       deviceSessionOutputDataSourceChanged();
 else       if (MediaDeviceSession.SSRC_LIST.equals(event.getPropertyName()))       deviceSessionSsrcListChanged(event);
    }
  }
;
  deviceSession.addPropertyChangeListener(deviceSessionPropertyChangeListener);
}