test_class.declarator: observers = newHashSet()
test_class.modifier: private final
test_class.original_string: private final Set<Observer> observers = newHashSet();
test_class.type: Set<Observer>
test_class.var_name: observers
test_class.declarator: observable = new Observable() {
          @Override
          public Closeable addObserver(final Observer observer) {
              observers.add(observer);
              return new Closeable() {
                  @Override
                  public void close() {
                      if (!observers.remove(observer)) {
                          fail("Already closed");
                      }
                  }
              };
          }
      }
test_class.modifier: private final
test_class.original_string: private final Observable observable = new Observable() {
          @Override
          public Closeable addObserver(final Observer observer) {
              observers.add(observer);
              return new Closeable() {
                  @Override
                  public void close() {
                      if (!observers.remove(observer)) {
                          fail("Already closed");
                      }
                  }
              };
          }
      };
test_class.type: Observable
test_class.var_name: observable
test_class.declarator: tracker = new ObserverTracker(observable)
test_class.modifier: private final
test_class.original_string: private final ObserverTracker tracker = new ObserverTracker(observable);
test_class.type: ObserverTracker
test_class.var_name: tracker
test_class.declarator: ref1 = mock(ServiceReference.class)
test_class.modifier: private final
test_class.original_string: private final ServiceReference ref1 = mock(ServiceReference.class);
test_class.type: ServiceReference
test_class.var_name: ref1
test_class.declarator: observer1 = mock(Observer.class)
test_class.modifier: private final
test_class.original_string: private final Observer observer1 = mock(Observer.class);
test_class.type: Observer
test_class.var_name: observer1
test_class.declarator: ref2 = mock(ServiceReference.class)
test_class.modifier: private final
test_class.original_string: private final ServiceReference ref2 = mock(ServiceReference.class);
test_class.type: ServiceReference
test_class.var_name: ref2
test_class.declarator: observer2 = mock(Observer.class)
test_class.modifier: private final
test_class.original_string: private final Observer observer2 = mock(Observer.class);
test_class.type: Observer
test_class.var_name: observer2
test_class.file: oak-store-spi/src/test/java/org/apache/jackrabbit/oak/spi/commit/ObserverTrackerTest.java
test_class.identifier: ObserverTrackerTest
test_case.body: @Test
      public void unregisterWhenEmpty() {
          tracker.removedService(ref1, null);
          assertTrue(observers.isEmpty());
      }
test_case.class_method_signature: ObserverTrackerTest.unregisterWhenEmpty()
test_case.full_signature: @Test public void unregisterWhenEmpty()
test_case.identifier: unregisterWhenEmpty
test_case.invocations: removedService assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void unregisterWhenEmpty()
focal_class.declarator: subscriptions = newHashMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<ServiceReference, Closeable> subscriptions = newHashMap();
focal_class.type: Map<ServiceReference, Closeable>
focal_class.var_name: subscriptions
focal_class.declarator: observable
focal_class.modifier: private final
focal_class.original_string: private final Observable observable;
focal_class.type: Observable
focal_class.var_name: observable
focal_class.declarator: bundleContext
focal_class.modifier: private
focal_class.original_string: private BundleContext bundleContext;
focal_class.type: BundleContext
focal_class.var_name: bundleContext
focal_class.declarator: observerTracker
focal_class.modifier: private
focal_class.original_string: private ServiceTracker observerTracker;
focal_class.type: ServiceTracker
focal_class.var_name: observerTracker
focal_class.file: oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/commit/ObserverTracker.java
focal_class.identifier: ObserverTracker
focal_class.interfaces: implements ServiceTrackerCustomizer
focal_class.class_method_signature: ObserverTracker.ObserverTracker(@NotNull Observable observable)
focal_class.full_signature: public  ObserverTracker(@NotNull Observable observable)
focal_class.identifier: ObserverTracker
focal_class.modifiers: public
focal_class.parameters: (@NotNull Observable observable)
focal_class.signature:  ObserverTracker(@NotNull Observable observable)
focal_class.class_method_signature: ObserverTracker.start(@NotNull BundleContext bundleContext)
focal_class.full_signature: public void start(@NotNull BundleContext bundleContext)
focal_class.identifier: start
focal_class.modifiers: public
focal_class.parameters: (@NotNull BundleContext bundleContext)
focal_class.return: void
focal_class.signature: void start(@NotNull BundleContext bundleContext)
focal_class.class_method_signature: ObserverTracker.stop()
focal_class.full_signature: public void stop()
focal_class.identifier: stop
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: ObserverTracker.addingService(ServiceReference reference)
focal_class.full_signature: @Override public Object addingService(ServiceReference reference)
focal_class.identifier: addingService
focal_class.modifiers: @Override public
focal_class.parameters: (ServiceReference reference)
focal_class.return: Object
focal_class.signature: Object addingService(ServiceReference reference)
focal_class.class_method_signature: ObserverTracker.modifiedService(ServiceReference reference, Object service)
focal_class.full_signature: @Override public void modifiedService(ServiceReference reference, Object service)
focal_class.identifier: modifiedService
focal_class.modifiers: @Override public
focal_class.parameters: (ServiceReference reference, Object service)
focal_class.return: void
focal_class.signature: void modifiedService(ServiceReference reference, Object service)
focal_class.class_method_signature: ObserverTracker.removedService(ServiceReference reference, Object service)
focal_class.full_signature: @Override public void removedService(ServiceReference reference, Object service)
focal_class.identifier: removedService
focal_class.modifiers: @Override public
focal_class.parameters: (ServiceReference reference, Object service)
focal_class.return: void
focal_class.signature: void removedService(ServiceReference reference, Object service)
focal_method.body: @Override
      public void removedService(ServiceReference reference, Object service) {
          Closeable subscription = subscriptions.remove(reference);
          if (subscription != null) {
              closeQuietly(subscription);
              bundleContext.ungetService(reference);
          }
      }
focal_method.class_method_signature: ObserverTracker.removedService(ServiceReference reference, Object service)
focal_method.full_signature: @Override public void removedService(ServiceReference reference, Object service)
focal_method.identifier: removedService
focal_method.invocations: remove closeQuietly ungetService
focal_method.modifiers: @Override public
focal_method.parameters: (ServiceReference reference, Object service)
focal_method.return: void
focal_method.signature: void removedService(ServiceReference reference, Object service)