Program: 104997
Project: 104997
Buggy source:
/** 
 * Starts   {@link #stream} if it has not been started yet and if the state ofthis <tt>Channel</tt> meets the prerequisites to invoke {@link MediaStream#start()}. For example, <tt>MediaStream</tt> may be started only after a <tt>StreamConnector</tt> has been set on it and this <tt>Channel</tt> may be able to provide a <tt>StreamConnector</tt> only after the transport manager has completed the connectivity establishment.
 * @throws IOException if anything goes wrong while starting <tt>stream</tt>
 */
@Override protected void maybeStartStream() throws IOException {
synchronized (streamSyncRoot) {
    if (stream == null)     return;
  }
  StreamConnector connector=getStreamConnector();
  if (connector == null)   return;
 else   stream.setConnector(connector);
  MediaStreamTarget streamTarget=createStreamTarget();
  if (streamTarget != null) {
    InetSocketAddress dataAddr=streamTarget.getDataAddress();
    if (dataAddr != null) {
      this.streamTarget.setDataHostAddress(dataAddr.getAddress());
      this.streamTarget.setDataPort(dataAddr.getPort());
    }
    InetSocketAddress ctrlAddr=streamTarget.getControlAddress();
    if (ctrlAddr != null) {
      this.streamTarget.setControlHostAddress(ctrlAddr.getAddress());
      this.streamTarget.setControlPort(ctrlAddr.getPort());
    }
    if (dataAddr != null)     stream.setTarget(streamTarget);
  }
  Content content=getContent();
  if (!stream.isStarted()) {
    if (RTPLevelRelayType.MIXER.equals(getRTPLevelRelayType()))     stream.setSSRCFactory(new SSRCFactoryImpl(initialLocalSSRC));
synchronized (streamSyncRoot) {
      stream.start();
    }
    Videobridge videobridge=getContent().getConference().getVideobridge();
    EventAdmin eventAdmin=videobridge.getEventAdmin();
    if (eventAdmin != null && streamTarget != null) {
      eventAdmin.sendEvent(EventFactory.streamStarted(this));
    }
  }
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str" + getID() + "String_Node_Str"+ content.getName()+ "String_Node_Str"+ content.getConference().getID()+ "String_Node_Str"+ stream.getDirection()+ "String_Node_Str");
  }
  touch();
}

Fixed version (ground truth):
/** 
 * Starts   {@link #stream} if it has not been started yet and if the state ofthis <tt>Channel</tt> meets the prerequisites to invoke {@link MediaStream#start()}. For example, <tt>MediaStream</tt> may be started only after a <tt>StreamConnector</tt> has been set on it and this <tt>Channel</tt> may be able to provide a <tt>StreamConnector</tt> only after the transport manager has completed the connectivity establishment.
 * @throws IOException if anything goes wrong while starting <tt>stream</tt>
 */
@Override protected void maybeStartStream() throws IOException {
synchronized (streamSyncRoot) {
    if (stream == null)     return;
  }
  MediaStreamTarget streamTarget=createStreamTarget();
  StreamConnector connector=getStreamConnector();
  if (streamTarget == null) {
    logger.info("String_Node_Str");
    return;
  }
  if (connector == null) {
    logger.info("String_Node_Str");
    return;
  }
  InetSocketAddress dataAddr=streamTarget.getDataAddress();
  if (dataAddr == null) {
    logger.info("String_Node_Str");
    return;
  }
  this.streamTarget.setDataHostAddress(dataAddr.getAddress());
  this.streamTarget.setDataPort(dataAddr.getPort());
  InetSocketAddress ctrlAddr=streamTarget.getControlAddress();
  if (ctrlAddr != null) {
    this.streamTarget.setControlHostAddress(ctrlAddr.getAddress());
    this.streamTarget.setControlPort(ctrlAddr.getPort());
  }
  stream.setTarget(streamTarget);
  stream.setConnector(connector);
  Content content=getContent();
  if (!stream.isStarted()) {
    if (RTPLevelRelayType.MIXER.equals(getRTPLevelRelayType()))     stream.setSSRCFactory(new SSRCFactoryImpl(initialLocalSSRC));
synchronized (streamSyncRoot) {
      stream.start();
    }
    Videobridge videobridge=getContent().getConference().getVideobridge();
    EventAdmin eventAdmin=videobridge.getEventAdmin();
    if (eventAdmin != null) {
      eventAdmin.sendEvent(EventFactory.streamStarted(this));
    }
  }
  if (logger.isTraceEnabled()) {
    logger.trace("String_Node_Str" + getID() + "String_Node_Str"+ content.getName()+ "String_Node_Str"+ content.getConference().getID()+ "String_Node_Str"+ stream.getDirection()+ "String_Node_Str");
  }
  touch();
}