#vulnerable code 
                             public void stop() throws IOException , InterruptedException {
		synchronized ( connections ) {
			for( WebSocket ws : connections ) {
				ws.close( CloseFrame.NORMAL );
			}
		}
		selectorthread.interrupt();
		selectorthread.join();
		for( WebSocketWorker w : decoders ) {
			w.interrupt();
		}
		this.server.close();

	} 
                            #location 8 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             public void stop() throws IOException , InterruptedException {
		stop( 0 );
	}