#vulnerable code 
                             public void run() {
		this.startupRecover(); // initialize

		this.markStartupDone();

		long swapMillis = System.currentTimeMillis() + 1000L * 30;

		while (this.released == false) {
			if (System.currentTimeMillis() < swapMillis) {
				this.waitingFor(100);
			} else {
				this.switchMasterAndSlaver();
				swapMillis = System.currentTimeMillis() + 1000L * 30;

				this.cleanupSlaver();
				this.compressSlaver();
			}
		}

		this.destroy();

	} 
                            #location 16 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                             public void run() {
		this.startupRecover(); // initialize

		this.markStartupDone();

		long swapMillis = System.currentTimeMillis() + 1000L * 30;

		while (this.released == false) {
			if (System.currentTimeMillis() < swapMillis) {
				this.waitingFor(100);
			} else {
				this.switchMasterAndSlaver();
				swapMillis = System.currentTimeMillis() + 1000L * 30;

				this.cleanupSlaver();
				this.compressSlaver();
			}
		}

		this.destroy();
	}