#fixed code
                             public void stop() throws IOException {
		for( WebSocket ws : connections ) {
			ws.close( CloseFrame.NORMAL );
		}
		thread.interrupt();
		this.server.close();

	}
#vulnerable code 
                             public void stop() throws IOException {
		synchronized ( connections ) {
			for( WebSocket ws : connections ) {
				ws.close( CloseFrame.NORMAL );
			}
		}
		thread.interrupt();
		this.server.close();

	} 
                            #location 8 
                            #vulnerability type THREAD_SAFETY_VIOLATION