Program: 76800
Project: 76800
Buggy source:
/** 
 * Receives a Close message. <p> A Close message consists of a status code and a reason for closing. The status code is an integer in the range   {@code 1000 <=code <= 65535}. The   {@code reason} is a short string that has anUTF-8 representation not longer than  {@code 123} bytes. For moredetails on Close message, status codes and reason see RFC 6455 sections <a href="https://tools.ietf.org/html/rfc6455#section-5.5.1">5.5.1. Close</a> and <a href="https://tools.ietf.org/html/rfc6455#section-7.4">7.4. Status Codes</a>. <p> After the returned  {@code CompletionStage} has completed(normally or exceptionally), the  {@code WebSocket} completes theclosing handshake by replying with an appropriate Close message. <p> This implementation replies with a Close message that has the same code this message has and an empty reason. <p>  {@code onClose} is the last invocation on the {@code Listener}. It is invoked at most once, but after   {@code onOpen}. If an exception is thrown from this method, it is ignored. <p> The   {@code WebSocket} will close at the earliest of completion ofthe returned  {@code CompletionStage} or sending a Close message. Inparticular, if a Close message has been  {@link WebSocket#sendClose() sent} before, then this invocation completes the closing handshakeand by the time this method is invoked, the  {@code WebSocket} willhave been closed.
 * @implSpec The default implementation of this method behaves as if:<pre> {@code return null;}</pre>
 * @param webSocket the WebSocket
 * @param statusCode the status code
 * @param reason the reason
 * @return a {@code CompletionStage} which completes when the {@code WebSocket} can be closed; or {@code null} if it can be closed immediately
 * @see #NORMAL_CLOSURE
 */
default CompletionStage<?> onClose(WebSocket webSocket,int statusCode,String reason){
  return null;
}

Fixed version (ground truth):
/** 
 * Receives a Close message. <p> A Close message consists of a status code and a reason for closing. The status code is an integer in the range   {@code 1000 <=code <= 65535}. The   {@code reason} is a short string that has anUTF-8 representation not longer than  {@code 123} bytes. For moredetails on Close message, status codes and reason see RFC 6455 sections <a href="https://tools.ietf.org/html/rfc6455#section-5.5.1">5.5.1. Close</a> and <a href="https://tools.ietf.org/html/rfc6455#section-7.4">7.4. Status Codes</a>. <p> After the returned  {@code CompletionStage} has completed(normally or exceptionally), the  {@code WebSocket} completes theclosing handshake by replying with an appropriate Close message. <p> This implementation replies with a Close message that has the same code this message has and an empty reason. <p>  {@code onClose} is the last invocation on the {@code Listener}. It is invoked at most once, but after   {@code onOpen}. If an exception is thrown from this method, it is ignored. <p> The   {@code WebSocket} will close at the earliest of completion ofthe returned  {@code CompletionStage} or sending a Close message. Inparticular, if a Close message has been  {@linkplain WebSocket#sendClose sent} before, then this invocation completes the closing handshakeand by the time this method is invoked, the  {@code WebSocket} willhave been closed.
 * @implSpec The default implementation of this method behaves as if:<pre> {@code return null;}</pre>
 * @param webSocket the WebSocket
 * @param statusCode the status code
 * @param reason the reason
 * @return a {@code CompletionStage} which completes when the {@code WebSocket} can be closed; or {@code null} if it can be closed immediately
 * @see #NORMAL_CLOSURE
 */
default CompletionStage<?> onClose(WebSocket webSocket,int statusCode,String reason){
  return null;
}