Program: 153946
Project: 153946
Buggy source:
public WebSocketBase(String url,WebSocketHandler handler,String... protocols) throws URISyntaxException, IOException {
  this.protocols=protocols;
  this.handler=handler;
  parseUrl(url);
  this.pipeline=new WebSocketPipeline();
  this.pipeline.addStreamHandler(new StreamHandlerAdapter(){
    public void nextUpstreamHandler(    WebSocket ws,    ByteBuffer buffer,    Frame frame,    StreamHandlerChain chain) throws WebSocketException {
      try {
        upstreamQueue.put(buffer);
        socket.register(selector,OP_READ | OP_WRITE);
      }
 catch (      InterruptedException e) {
        throw new WebSocketException(3011,e);
      }
catch (      ClosedChannelException e) {
        throw new WebSocketException(3010,e);
      }
    }
    public void nextHandshakeUpstreamHandler(    WebSocket ws,    ByteBuffer buffer,    StreamHandlerChain chain) throws WebSocketException {
      try {
        upstreamQueue.put(buffer);
      }
 catch (      InterruptedException e) {
        throw new WebSocketException(3012,e);
      }
    }
  }
);
  initializePipeline(pipeline);
  this.pipeline.addStreamHandler(new StreamHandlerAdapter(){
    public void nextDownstreamHandler(    WebSocket ws,    ByteBuffer buffer,    Frame frame,    StreamHandlerChain chain) throws WebSocketException {
      WebSocketBase.this.handler.onMessage(ws,frame);
    }
    public void nextHandshakeDownstreamHandler(    WebSocket ws,    ByteBuffer buffer,    StreamHandlerChain chain) throws WebSocketException {
      responseHeaderMap=getHandshake().getResponseHeaderMap();
      responseStatus=getHandshake().getResponseStatus();
      getFrameParser().init();
      transitionTo(State.WAIT);
      WebSocketBase.this.handler.onOpen(WebSocketBase.this);
    }
  }
);
  this.origin=System.getProperty("String_Node_Str");
  int downstreamBufferSize=Integer.getInteger("String_Node_Str",8192);
  this.downstreamBuffer=ByteBuffer.allocate(downstreamBufferSize);
}

Fixed version (ground truth):
public WebSocketBase(String url,WebSocketHandler handler,String... protocols) throws URISyntaxException, IOException {
  this.protocols=protocols;
  this.handler=handler;
  this.origin=System.getProperty("String_Node_Str");
  int downstreamBufferSize=Integer.getInteger("String_Node_Str",8192);
  this.downstreamBuffer=ByteBuffer.allocate(downstreamBufferSize);
  this.packatdumpMode=Integer.getInteger("String_Node_Str");
  parseUrl(url);
  this.pipeline=new WebSocketPipeline();
  this.pipeline.addStreamHandler(new StreamHandlerAdapter(){
    public void nextUpstreamHandler(    WebSocket ws,    ByteBuffer buffer,    Frame frame,    StreamHandlerChain chain) throws WebSocketException {
      try {
        upstreamQueue.put(buffer);
        selector.wakeup();
      }
 catch (      InterruptedException e) {
        throw new WebSocketException(3011,e);
      }
    }
    public void nextHandshakeUpstreamHandler(    WebSocket ws,    ByteBuffer buffer,    StreamHandlerChain chain) throws WebSocketException {
      try {
        upstreamQueue.put(buffer);
      }
 catch (      InterruptedException e) {
        throw new WebSocketException(3012,e);
      }
    }
  }
);
  if (packatdumpMode > 0) {
    this.pipeline.addStreamHandler(new PacketDumpStreamHandler(packatdumpMode));
  }
  initializePipeline(pipeline);
  this.pipeline.addStreamHandler(new StreamHandlerAdapter(){
    public void nextDownstreamHandler(    WebSocket ws,    ByteBuffer buffer,    Frame frame,    StreamHandlerChain chain) throws WebSocketException {
      WebSocketBase.this.handler.onMessage(ws,frame);
    }
    public void nextHandshakeDownstreamHandler(    WebSocket ws,    ByteBuffer buffer,    StreamHandlerChain chain) throws WebSocketException {
      responseHeaderMap=getHandshake().getResponseHeaderMap();
      responseStatus=getHandshake().getResponseStatus();
      getFrameParser().init();
      transitionTo(State.WAIT);
      WebSocketBase.this.handler.onOpen(WebSocketBase.this);
    }
  }
);
}