Program: 77329
Project: 77329
Buggy source:
/** 
 * Sends a message via this channel. <P> If this channel is in non-blocking mode and there is sufficient room in the underlying output buffer, or if this channel is in blocking mode and sufficient room becomes available, then the remaining bytes in the given byte buffer are transmitted as a single message. Sending a message is atomic unless explicit message completion   {@link SctpStandardSocketOptions#SCTP_EXPLICIT_COMPLETE SCTP_EXPLICIT_COMPLETE}socket option is enabled on this channel's socket. <P> The message is transferred from the byte buffer as if by a regular  {@link java.nio.channels.WritableByteChannel#write(java.nio.ByteBuffer) write} operation.<P> The bytes will be written to the stream number that is specified by {@link MessageInfo#streamNumber streamNumber} in the given {@code messageInfo}. <P> This method may be invoked at any time. If another thread has already initiated a send operation upon this channel, then an invocation of this method will block until the first operation is complete.
 * @param src The buffer containing the message to be sent
 * @param messageInfo Ancillary data about the message to be sent
 * @return  The number of bytes sent, which will be either the number ofbytes that were remaining in the messages buffer when this method was invoked or, if this channel is non-blocking, may be zero if there was insufficient room for the message in the underlying output buffer
 * @throws InvalidStreamExcepton If  {@code streamNumner} is negative or greater than or equal tothe maximum number of outgoing streams
 * @throws java.nio.channels.ClosedChannelException If this channel is closed
 * @throws java.nio.channels.AsynchronousCloseException If another thread closes this channel while the read operation is in progress
 * @throws java.nio.channels.ClosedByInterruptException If another thread interrupts the current thread while the read operation is in progress, thereby closing the channel and setting the current thread's interrupt status
 * @throws java.nio.channels.NotYetConnectedException If this channel is not yet connected
 * @throws IOException If some other I/O error occurs
 */
public abstract int send(ByteBuffer src,MessageInfo messageInfo) throws IOException ;

Fixed version (ground truth):
/** 
 * Sends a message via this channel. <P> If this channel is in non-blocking mode and there is sufficient room in the underlying output buffer, or if this channel is in blocking mode and sufficient room becomes available, then the remaining bytes in the given byte buffer are transmitted as a single message. Sending a message is atomic unless explicit message completion   {@link SctpStandardSocketOptions#SCTP_EXPLICIT_COMPLETE SCTP_EXPLICIT_COMPLETE}socket option is enabled on this channel's socket. <P> The message is transferred from the byte buffer as if by a regular  {@link java.nio.channels.WritableByteChannel#write(java.nio.ByteBuffer) write} operation.<P> The bytes will be written to the stream number that is specified by {@link MessageInfo#streamNumber streamNumber} in the given {@code messageInfo}. <P> This method may be invoked at any time. If another thread has already initiated a send operation upon this channel, then an invocation of this method will block until the first operation is complete.
 * @param src The buffer containing the message to be sent
 * @param messageInfo Ancillary data about the message to be sent
 * @return  The number of bytes sent, which will be either the number ofbytes that were remaining in the messages buffer when this method was invoked or, if this channel is non-blocking, may be zero if there was insufficient room for the message in the underlying output buffer
 * @throws InvalidStreamException If  {@code streamNumner} is negative or greater than or equal tothe maximum number of outgoing streams
 * @throws java.nio.channels.ClosedChannelException If this channel is closed
 * @throws java.nio.channels.AsynchronousCloseException If another thread closes this channel while the read operation is in progress
 * @throws java.nio.channels.ClosedByInterruptException If another thread interrupts the current thread while the read operation is in progress, thereby closing the channel and setting the current thread's interrupt status
 * @throws java.nio.channels.NotYetConnectedException If this channel is not yet connected
 * @throws IOException If some other I/O error occurs
 */
public abstract int send(ByteBuffer src,MessageInfo messageInfo) throws IOException ;