Program: 105067
Project: 105067
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   {@link #wrapupConnectivityEstablishment(TransportManager)} hascompleted on  {@link #transportManager}.
 * @throws IOException if anything goes wrong while starting <tt>stream</tt>
 */
@Override protected void maybeStartStream() throws IOException {
  StreamConnector connector=createStreamConnector();
  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()) {
    SrtpControl srtpControl=stream.getSrtpControl();
    if (srtpControl != null) {
      if (srtpControl instanceof DtlsControl) {
        DtlsControl dtlsControl=(DtlsControl)srtpControl;
        dtlsControl.setSetup(isInitiator() ? DtlsControl.Setup.PASSIVE : DtlsControl.Setup.ACTIVE);
      }
      srtpControl.start(content.getMediaType());
    }
    stream.start();
  }
  logd("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   {@link #wrapupConnectivityEstablishment(TransportManager)} hascompleted on  {@link #transportManager}.
 * @throws IOException if anything goes wrong while starting <tt>stream</tt>
 */
@Override protected void maybeStartStream() throws IOException {
  StreamConnector connector=createStreamConnector();
  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));
    SrtpControl srtpControl=stream.getSrtpControl();
    if (srtpControl != null) {
      if (srtpControl instanceof DtlsControl) {
        DtlsControl dtlsControl=(DtlsControl)srtpControl;
        dtlsControl.setSetup(isInitiator() ? DtlsControl.Setup.PASSIVE : DtlsControl.Setup.ACTIVE);
      }
      srtpControl.start(content.getMediaType());
    }
    stream.start();
  }
  logd("String_Node_Str" + getID() + "String_Node_Str"+ content.getName()+ "String_Node_Str"+ content.getConference().getID()+ "String_Node_Str"+ stream.getDirection()+ "String_Node_Str");
  touch();
}