long start = 0; if (Debug.DEBUG) start = System.currentTimeMillis();
	protected void beginStateChange() throws BundleException {		synchronized (statechangeLock) {			boolean doubleFault = false;			while (true) {				if (stateChanging == null) {					stateChanging = Thread.currentThread();					return;				}				if (doubleFault || (stateChanging == Thread.currentThread())) {					throw new BundleException(NLS.bind(Msg.BUNDLE_STATE_CHANGE_EXCEPTION, getBundleData().getLocation(), stateChanging.getName()));				}				try {					if (Debug.DEBUG && Debug.DEBUG_GENERAL) {						Debug.println(" Waiting for state to change in bundle " + this); //$NON-NLS-1$					}					long start = 0;					if (Debug.DEBUG)						start = System.currentTimeMillis();					statechangeLock.wait(5000); /*					 * wait for other thread to					 * finish changing state					 */					if (Debug.DEBUG) {						long end = System.currentTimeMillis();						if (end - start > 0) {							System.out.println("Waiting... : " + getSymbolicName() + ' ' + (end - start)); //$NON-NLS-1$						}					}				} catch (InterruptedException e) {					//Nothing to do				}				doubleFault = true;			}		}	}