#vulnerable code 
                             public void close () {
		super.close();
		// Select one last time to complete closing the socket.
		synchronized (updateLock) {
			if (!isClosed) {
				isClosed = true;
				selector.wakeup();
				try {
					selector.selectNow();
				} catch (IOException ignored) {
				}
			}
		}
	} 
                            #location 5 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             public void close () {
		super.close();
		synchronized (updateLock) { // Blocks to avoid a select while the selector is used to bind the server connection.
		}
		// Select one last time to complete closing the socket.
		if (!isClosed) {
			isClosed = true;
			selector.wakeup();
			try {
				selector.selectNow();
			} catch (IOException ignored) {
			}
		}
	}