Program: 103687
Project: 103687
Buggy source:
/** 
 * Stops the processing of media in this instance in a specific direction.
 * @param direction a <tt>MediaDirection</tt> value which represents thedirection of the processing of media to be stopped. For example, {@link MediaDirection#SENDRECV} to stop both capture and playback ofmedia in this instance or  {@link MediaDirection#SENDONLY} to only stopthe capture of media in this instance
 */
@SuppressWarnings("String_Node_Str") private void stop(MediaDirection direction){
  if (direction == null)   throw new NullPointerException("String_Node_Str");
  if (rtpManager == null)   return;
  if ((MediaDirection.SENDRECV.equals(direction) || MediaDirection.SENDONLY.equals(direction)) && (MediaDirection.SENDRECV.equals(startedDirection) || MediaDirection.SENDONLY.equals(startedDirection))) {
    stopSendStreams(false);
    if (deviceSession != null)     deviceSession.stop(MediaDirection.SENDONLY);
    if (MediaDirection.SENDRECV.equals(startedDirection))     startedDirection=MediaDirection.RECVONLY;
 else     if (MediaDirection.SENDONLY.equals(startedDirection))     startedDirection=null;
  }
  if ((MediaDirection.SENDRECV.equals(direction) || MediaDirection.RECVONLY.equals(direction)) && (MediaDirection.SENDRECV.equals(startedDirection) || MediaDirection.RECVONLY.equals(startedDirection))) {
    Iterable<ReceiveStream> receiveStreams;
    try {
      receiveStreams=rtpManager.getReceiveStreams();
    }
 catch (    Exception e) {
      logger.trace("String_Node_Str",e);
      receiveStreams=null;
    }
    if (receiveStreams != null)     for (    ReceiveStream receiveStream : receiveStreams)     try {
      DataSource receiveStreamDataSource=receiveStream.getDataSource();
      if (receiveStreamDataSource != null)       receiveStreamDataSource.stop();
    }
 catch (    IOException ioe) {
      logger.warn("String_Node_Str" + receiveStream,ioe);
    }
    if (deviceSession != null)     deviceSession.stop(MediaDirection.RECVONLY);
    if (MediaDirection.SENDRECV.equals(startedDirection))     startedDirection=MediaDirection.SENDONLY;
 else     if (MediaDirection.RECVONLY.equals(startedDirection))     startedDirection=null;
  }
}

Fixed version (ground truth):
/** 
 * Stops the processing of media in this instance in a specific direction.
 * @param direction a <tt>MediaDirection</tt> value which represents thedirection of the processing of media to be stopped. For example, {@link MediaDirection#SENDRECV} to stop both capture and playback ofmedia in this instance or  {@link MediaDirection#SENDONLY} to only stopthe capture of media in this instance
 */
private void stop(MediaDirection direction){
  if (direction == null)   throw new NullPointerException("String_Node_Str");
  if (rtpManager == null)   return;
  if ((MediaDirection.SENDRECV.equals(direction) || MediaDirection.SENDONLY.equals(direction)) && (MediaDirection.SENDRECV.equals(startedDirection) || MediaDirection.SENDONLY.equals(startedDirection))) {
    stopSendStreams(false);
    if (deviceSession != null)     deviceSession.stop(MediaDirection.SENDONLY);
    if (MediaDirection.SENDRECV.equals(startedDirection))     startedDirection=MediaDirection.RECVONLY;
 else     if (MediaDirection.SENDONLY.equals(startedDirection))     startedDirection=null;
  }
  if ((MediaDirection.SENDRECV.equals(direction) || MediaDirection.RECVONLY.equals(direction)) && (MediaDirection.SENDRECV.equals(startedDirection) || MediaDirection.RECVONLY.equals(startedDirection))) {
    stopReceiveStreams();
    if (deviceSession != null)     deviceSession.stop(MediaDirection.RECVONLY);
    if (MediaDirection.SENDRECV.equals(startedDirection))     startedDirection=MediaDirection.SENDONLY;
 else     if (MediaDirection.RECVONLY.equals(startedDirection))     startedDirection=null;
  }
}