Program: 153930
Project: 153930
Buggy source:
@Override protected Handshake newHandshakeInstance(){
  return new Handshake(){
    /** 
 * Create a handshake requtest Sample (Draft06) client => server GET /chat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Sec-WebSocket-Origin: http://example.com Sec-WebSocket-Protocol: chat, superchat Sec-WebSocket-Version:6
 * @param socket
 */
    @Override public ByteBuffer createHandshakeRequest() throws WebSocketException {
      StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str" + path + "String_Node_Str");
      addHeader(sb,"String_Node_Str",endpoint.getHostName());
      addHeader(sb,"String_Node_Str","String_Node_Str");
      addHeader(sb,"String_Node_Str","String_Node_Str");
      addHeader(sb,"String_Node_Str",generateWebSocketKey());
      if (origin != null) {
        addHeader(sb,"String_Node_Str",origin);
      }
      if (protocols != null && protocols.length > 0) {
        addHeader(sb,"String_Node_Str",join("String_Node_Str",protocols));
      }
      if (extensions.size() > 0) {
        addHeader(sb,"String_Node_Str",join("String_Node_Str",extensions));
      }
      addHeader(sb,"String_Node_Str",String.valueOf(getWebSocketVersion()));
      sb.append("String_Node_Str");
      return ByteBuffer.wrap(sb.toString().getBytes());
    }
    /** 
 * check handshake response server => client HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Sec-WebSocket-Protocol: chat
 * @param buffer
 */
    @Override protected boolean parseHandshakeResponseHeader(    ByteBuffer buffer) throws WebSocketException {
      if (!super.parseHandshakeResponseHeader(buffer)) {
        return false;
      }
      if (!"String_Node_Str".equalsIgnoreCase(responseHeaderMap.get("String_Node_Str"))) {
        throw new WebSocketException(3101,"String_Node_Str" + responseHeaderMap.get("String_Node_Str"));
      }
      if (!"String_Node_Str".equalsIgnoreCase(responseHeaderMap.get("String_Node_Str"))) {
        throw new WebSocketException(3101,"String_Node_Str" + responseHeaderMap.get("String_Node_Str"));
      }
      if (!responseHeaderMap.containsKey("String_Node_Str")) {
        throw new WebSocketException(3101,"String_Node_Str");
      }
      String protocolStr=responseHeaderMap.get("String_Node_Str");
      if (protocolStr != null) {
        serverProtocols=protocolStr.split("String_Node_Str");
      }
      String extensionsStr=responseHeaderMap.get("String_Node_Str");
      if (extensionsStr != null) {
        serverExtentions=extensionsStr.split("String_Node_Str");
      }
      return true;
    }
  }
;
}

Fixed version (ground truth):
@Override protected Handshake newHandshakeInstance(){
  return new Handshake(){
    /** 
 * Create a handshake requtest <pre> Sample (Draft06) client => server GET /chat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Sec-WebSocket-Origin: http://example.com Sec-WebSocket-Protocol: chat, superchat Sec-WebSocket-Version:6 </pre>
 * @param socket
 */
    @Override public ByteBuffer createHandshakeRequest() throws WebSocketException {
      StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str" + path + "String_Node_Str");
      addHeader(sb,"String_Node_Str",endpoint.getHostName());
      addHeader(sb,"String_Node_Str","String_Node_Str");
      addHeader(sb,"String_Node_Str","String_Node_Str");
      addHeader(sb,"String_Node_Str",generateWebSocketKey());
      if (origin != null) {
        addHeader(sb,"String_Node_Str",origin);
      }
      if (protocols != null && protocols.length > 0) {
        addHeader(sb,"String_Node_Str",join("String_Node_Str",protocols));
      }
      if (extensions.size() > 0) {
        addHeader(sb,"String_Node_Str",join("String_Node_Str",extensions));
      }
      addHeader(sb,"String_Node_Str",String.valueOf(getWebSocketVersion()));
      sb.append("String_Node_Str");
      return ByteBuffer.wrap(sb.toString().getBytes());
    }
    /** 
 * check handshake response <pre> server => client HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Sec-WebSocket-Protocol: chat </pre>
 * @param buffer
 */
    @Override protected boolean parseHandshakeResponseHeader(    ByteBuffer buffer) throws WebSocketException {
      if (!super.parseHandshakeResponseHeader(buffer)) {
        return false;
      }
      if (!"String_Node_Str".equalsIgnoreCase(responseHeaderMap.get("String_Node_Str"))) {
        throw new WebSocketException(3600,"String_Node_Str" + responseHeaderMap.get("String_Node_Str"));
      }
      if (!"String_Node_Str".equalsIgnoreCase(responseHeaderMap.get("String_Node_Str"))) {
        throw new WebSocketException(3601,"String_Node_Str" + responseHeaderMap.get("String_Node_Str"));
      }
      if (!responseHeaderMap.containsKey("String_Node_Str")) {
        throw new WebSocketException(3602,"String_Node_Str");
      }
      String protocolStr=responseHeaderMap.get("String_Node_Str");
      if (protocolStr != null) {
        serverProtocols=protocolStr.split("String_Node_Str");
      }
      String extensionsStr=responseHeaderMap.get("String_Node_Str");
      if (extensionsStr != null) {
        serverExtentions=extensionsStr.split("String_Node_Str");
      }
      return true;
    }
  }
;
}