if (DEBUG) { System.out .println("ServiceTracker.Tracked.track[adding]: " + reference); } boolean becameUntracked = false;  try { object = customizer.addingService(reference);  } finally { synchronized (this) { if (adding.remove(reference)) {  if (object != null) { this.put(reference, object); modified();  notifyAll(); } } else { becameUntracked = true; } } }  if (becameUntracked) { if (DEBUG) { System.out .println("ServiceTracker.Tracked.track[removed]: " + reference); }  customizer.removedService(reference, object);  }
trackAdding(reference);
		protected void track(ServiceReference reference) {			Object object;			synchronized (this) {				if (initial.contains(reference)) { /*													 * if this service is													 * already in the list of													 * initial references to													 * process													 */					if (DEBUG) {						System.out								.println("ServiceTracker.Tracked.track[already in initial]: " + reference); //$NON-NLS-1$					}					return; /* it will be tracked later */				}				object = this.get(reference);			}			if (object != null) /* we are already tracking the service */			{				if (DEBUG) {					System.out							.println("ServiceTracker.Tracked.track[modified]: " + reference); //$NON-NLS-1$				}				/* Call customizer outside of synchronized region */				customizer.modifiedService(reference, object);				/*				 * If the customizer throws an unchecked exception, it is safe				 * to let it propagate				 */				return;			}			synchronized (this) {				if (adding.contains(reference)) { /*													 * if this service is													 * already in the process of													 * being added.													 */					if (DEBUG) {						System.out								.println("ServiceTracker.Tracked.track[already adding]: " + reference); //$NON-NLS-1$					}					return;				}				adding.add(reference); /* mark this service is being added */			}			if (DEBUG) {				System.out						.println("ServiceTracker.Tracked.track[adding]: " + reference); //$NON-NLS-1$			}			boolean becameUntracked = false;			/* Call customizer outside of synchronized region */			try {				object = customizer.addingService(reference);				/*				 * If the customizer throws an unchecked exception, it will				 * propagate after the finally				 */			}			finally {				synchronized (this) {					if (adding.remove(reference)) { /*													 * if the service was not													 * untracked during the													 * customizer callback													 */						if (object != null) {							this.put(reference, object);							modified(); /* increment modification count */							notifyAll();						}					}					else {						becameUntracked = true;					}				}			}			/*			 * The service became untracked during the customizer callback.			 */			if (becameUntracked) {				if (DEBUG) {					System.out							.println("ServiceTracker.Tracked.track[removed]: " + reference); //$NON-NLS-1$				}				/* Call customizer outside of synchronized region */				customizer.removedService(reference, object);				/*				 * If the customizer throws an unchecked exception, it is safe				 * to let it propagate				 */			}		}