Program: 71319
Project: 71319
Buggy source:
/** 
 * Returns an input stream for this socket. <p> If this socket has an associated channel then the resulting input stream delegates all of its operations to the channel.  If the channel is in non-blocking mode then the input stream's   {@code read} operationswill throw an  {@link java.nio.channels.IllegalBlockingModeException}. <p>Under abnormal conditions the underlying connection may be broken by the remote host or the network software (for example a connection reset in the case of TCP connections). When a broken connection is detected by the network software the following applies to the returned input stream :- <ul> <li><p>The network software may discard bytes that are buffered by the socket. Bytes that aren't discarded by the network software can be read using   {@link java.io.InputStream#read read}. <li><p>If there are no bytes buffered on the socket, or all buffered bytes have been consumed by  {@link java.io.InputStream#read read}, then all subsequent calls to   {@link java.io.InputStream#read read} will throw an{@link java.io.IOException IOException}. <li><p>If there are no bytes buffered on the socket, and the socket has not been closed using   {@link #close close}, then  {@link java.io.InputStream#available available} willreturn  {@code 0}. </ul> <p> Closing the returned   {@link java.io.InputStream InputStream}will close the associated socket.
 * @return     an input stream for reading bytes from this socket.
 * @exception IOException  if an I/O error occurs when creating theinput stream, the socket is closed, the socket is not connected, or the socket input has been shutdown using  {@link #shutdownInput()}
 * @revised 1.4
 * @spec JSR-51
 */
public InputStream getInputStream() throws IOException {
  if (isClosed())   throw new SocketException("String_Node_Str");
  if (!isConnected())   throw new SocketException("String_Node_Str");
  if (isInputShutdown())   throw new SocketException("String_Node_Str");
  final Socket s=this;
  InputStream is=null;
  try {
    is=AccessController.doPrivileged(new PrivilegedExceptionAction<>(){
      public InputStream run() throws IOException {
        return impl.getInputStream();
      }
    }
);
  }
 catch (  java.security.PrivilegedActionException e) {
    throw (IOException)e.getException();
  }
  return is;
}

Fixed version (ground truth):
/** 
 * Returns an input stream for this socket. <p> If this socket has an associated channel then the resulting input stream delegates all of its operations to the channel.  If the channel is in non-blocking mode then the input stream's   {@code read} operationswill throw an  {@link java.nio.channels.IllegalBlockingModeException}. <p>Under abnormal conditions the underlying connection may be broken by the remote host or the network software (for example a connection reset in the case of TCP connections). When a broken connection is detected by the network software the following applies to the returned input stream :- <ul> <li><p>The network software may discard bytes that are buffered by the socket. Bytes that aren't discarded by the network software can be read using   {@link java.io.InputStream#read read}. <li><p>If there are no bytes buffered on the socket, or all buffered bytes have been consumed by  {@link java.io.InputStream#read read}, then all subsequent calls to   {@link java.io.InputStream#read read} will throw an{@link java.io.IOException IOException}. <li><p>If there are no bytes buffered on the socket, and the socket has not been closed using   {@link #close close}, then  {@link java.io.InputStream#available available} willreturn  {@code 0}. </ul> <p> Closing the returned   {@link java.io.InputStream InputStream}will close the associated socket.
 * @return     an input stream for reading bytes from this socket.
 * @exception IOException  if an I/O error occurs when creating theinput stream, the socket is closed, the socket is not connected, or the socket input has been shutdown using  {@link #shutdownInput()}
 * @revised 1.4
 * @spec JSR-51
 */
public InputStream getInputStream() throws IOException {
  if (isClosed())   throw new SocketException("String_Node_Str");
  if (!isConnected())   throw new SocketException("String_Node_Str");
  if (isInputShutdown())   throw new SocketException("String_Node_Str");
  InputStream is=null;
  try {
    is=AccessController.doPrivileged(new PrivilegedExceptionAction<>(){
      public InputStream run() throws IOException {
        return impl.getInputStream();
      }
    }
);
  }
 catch (  java.security.PrivilegedActionException e) {
    throw (IOException)e.getException();
  }
  return is;
}