Program: 82001
Project: 82001
Buggy source:
/** 
 * Build SCTP connection with remote SCTP server.
 * @param connector
 * @param streamTarget
 */
public void connect(final StreamConnector connector,final MediaStreamTarget streamTarget){
  logger.debug(connector.getDataSocket().getLocalAddress().getHostName() + "String_Node_Str" + connector.getDataSocket().getLocalPort()+ "String_Node_Str"+ streamTarget.getDataAddress().getHostName()+ "String_Node_Str"+ streamTarget.getDataAddress().getPort());
  dtlsControl.start(MediaType.DATA);
  executorService.execute(new Runnable(){
    @Override public void run(){
      try {
        Sctp.init();
        RTPConnectorUDPImpl rtpConnector=new RTPConnectorUDPImpl(connector);
        rtpConnector.addTarget(new SessionAddress(streamTarget.getDataAddress().getAddress(),streamTarget.getDataAddress().getPort()));
        dtlsControl.setConnector(rtpConnector);
        DtlsTransformEngine engine=(DtlsTransformEngine)dtlsControl.getTransformEngine();
        final DtlsPacketTransformer transformer=(DtlsPacketTransformer)engine.getRTPTransformer();
        sctpSocket=Sctp.createSocket(5000);
        sctpSocket.setNotificationListener(SctpConnection.this);
        sctpSocket.setDataCallback(SctpConnection.this);
        DatagramSocket iceUdpSocket=rtpConnector.getDataSocket();
        byte[] receiveBuffer=new byte[2035];
        DatagramPacket rcvPacket=new DatagramPacket(receiveBuffer,0,receiveBuffer.length);
        sctpSocket.setLink(new NetworkLink(){
          private final RawPacket rawPacket=new RawPacket();
          @Override public void onConnOut(          org.jitsi.sctp4j.SctpSocket s,          byte[] packet) throws IOException {
            rawPacket.setBuffer(packet);
            rawPacket.setLength(packet.length);
            transformer.transform(rawPacket);
          }
        }
);
        final int port=5000;
        sctpSocket.connect(port);
        while (true) {
          iceUdpSocket.receive(rcvPacket);
          RawPacket raw=new RawPacket(rcvPacket.getData(),rcvPacket.getOffset(),rcvPacket.getLength());
          raw=transformer.reverseTransform(raw);
          if (raw == null)           continue;
          sctpSocket.onConnIn(raw.getBuffer(),raw.getOffset(),raw.getLength());
        }
      }
 catch (      IOException e) {
        e.printStackTrace();
        fireEvent(new JireconTaskEvent(JireconTaskEvent.Type.RECORDER_ABORTED));
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Build SCTP connection with remote SCTP server.
 * @param connector
 * @param streamTarget
 */
public void connect(final StreamConnector connector,final MediaStreamTarget streamTarget){
  logger.debug(connector.getDataSocket().getLocalAddress().getHostName() + "String_Node_Str" + connector.getDataSocket().getLocalPort()+ "String_Node_Str"+ streamTarget.getDataAddress().getHostName()+ "String_Node_Str"+ streamTarget.getDataAddress().getPort());
  dtlsControl.start(MediaType.DATA);
  executorService.execute(new Runnable(){
    @Override public void run(){
      DatagramSocket iceUdpSocket=null;
      try {
        Sctp.init();
        RTPConnectorUDPImpl rtpConnector=new RTPConnectorUDPImpl(connector);
        rtpConnector.addTarget(new SessionAddress(streamTarget.getDataAddress().getAddress(),streamTarget.getDataAddress().getPort()));
        dtlsControl.setConnector(rtpConnector);
        DtlsTransformEngine engine=(DtlsTransformEngine)dtlsControl.getTransformEngine();
        final DtlsPacketTransformer transformer=(DtlsPacketTransformer)engine.getRTPTransformer();
        sctpSocket=Sctp.createSocket(5000);
        sctpSocket.setNotificationListener(SctpConnection.this);
        sctpSocket.setDataCallback(SctpConnection.this);
        iceUdpSocket=rtpConnector.getDataSocket();
        byte[] receiveBuffer=new byte[2035];
        DatagramPacket rcvPacket=new DatagramPacket(receiveBuffer,0,receiveBuffer.length);
        sctpSocket.setLink(new NetworkLink(){
          private final RawPacket rawPacket=new RawPacket();
          @Override public void onConnOut(          org.jitsi.sctp4j.SctpSocket s,          byte[] packet) throws IOException {
            rawPacket.setBuffer(packet);
            rawPacket.setLength(packet.length);
            transformer.transform(rawPacket);
          }
        }
);
        final int port=5000;
        sctpSocket.connect(port);
        while (!iceUdpSocket.isClosed()) {
          iceUdpSocket.receive(rcvPacket);
          RawPacket raw=new RawPacket(rcvPacket.getData(),rcvPacket.getOffset(),rcvPacket.getLength());
          raw=transformer.reverseTransform(raw);
          if (raw == null)           continue;
          sctpSocket.onConnIn(raw.getBuffer(),raw.getOffset(),raw.getLength());
        }
      }
 catch (      IOException e) {
        if (!iceUdpSocket.isClosed()) {
          e.printStackTrace();
          fireEvent(new JireconTaskEvent(JireconTaskEvent.Type.RECORDER_ABORTED));
        }
      }
    }
  }
);
}