#vulnerable code 
                             public void disconnect() throws InterruptedException,
			ServiceLocatorException {
		disconnect(true, false);
	} 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             public void disconnect() throws InterruptedException,
			ServiceLocatorException {
		try {
			synchronized (this) {
				if (LOG.isLoggable(Level.FINE)) {
					LOG.log(Level.FINE, "Start disconnect session");
				}

				blockedByRunUpOperation = true;

				disconnect(false);

				blockedByRunUpOperation = false;

				if (LOG.isLoggable(Level.FINER)) {
					LOG.log(Level.FINER, "End disconnect session");
				}
			}
		} catch (InterruptedException e) {
			blockedByRunUpOperation = false;
			throw e;
		} catch (ServiceLocatorException e) {
			blockedByRunUpOperation = false;
			throw e;
		} catch (Exception e) {
			blockedByRunUpOperation = false;
			if (LOG.isLoggable(Level.SEVERE)) {
				LOG.log(Level.SEVERE, "Connect not passed: " + e.getMessage());
			}
		}

	}