test_class.declarator: scoped
test_class.modifier: @Mock
test_class.original_string: @Mock Scoped scoped;
test_class.type: Scoped
test_class.var_name: scoped
test_class.declarator: activityScope
test_class.modifier: private
test_class.original_string: private MortarScope activityScope;
test_class.type: MortarScope
test_class.var_name: activityScope
test_class.file: mortar/src/test/java/mortar/bundler/BundleServiceTest.java
test_class.identifier: BundleServiceTest
test_class.superclass: extends TestCase
test_case.body: @Test public void onRegisteredIsDebounced() {
      activityScope.register(scoped);
      activityScope.register(scoped);
      verify(scoped, times(1)).onEnterScope(activityScope);
    }
test_case.class_method_signature: BundleServiceTest.onRegisteredIsDebounced()
test_case.full_signature: @Test public void onRegisteredIsDebounced()
test_case.identifier: onRegisteredIsDebounced
test_case.invocations: register register onEnterScope verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void onRegisteredIsDebounced()
focal_class.declarator: runner
focal_class.modifier: final
focal_class.original_string: final BundleServiceRunner runner;
focal_class.type: BundleServiceRunner
focal_class.var_name: runner
focal_class.declarator: scope
focal_class.modifier: final
focal_class.original_string: final MortarScope scope;
focal_class.type: MortarScope
focal_class.var_name: scope
focal_class.declarator: bundlers = new LinkedHashSet<>()
focal_class.modifier: final
focal_class.original_string: final Set<Bundler> bundlers = new LinkedHashSet<>();
focal_class.type: Set<Bundler>
focal_class.var_name: bundlers
focal_class.declarator: scopeBundle
focal_class.original_string: Bundle scopeBundle;
focal_class.type: Bundle
focal_class.var_name: scopeBundle
focal_class.declarator: toBeLoaded = new ArrayList<>()
focal_class.modifier: private
focal_class.original_string: private List<Bundler> toBeLoaded = new ArrayList<>();
focal_class.type: List<Bundler>
focal_class.var_name: toBeLoaded
focal_class.file: mortar/src/main/java/mortar/bundler/BundleService.java
focal_class.identifier: BundleService
focal_class.class_method_signature: BundleService.BundleService(BundleServiceRunner runner, MortarScope scope)
focal_class.full_signature:   BundleService(BundleServiceRunner runner, MortarScope scope)
focal_class.identifier: BundleService
focal_class.parameters: (BundleServiceRunner runner, MortarScope scope)
focal_class.signature:  BundleService(BundleServiceRunner runner, MortarScope scope)
focal_class.class_method_signature: BundleService.getBundleService(Context context)
focal_class.full_signature: public static BundleService getBundleService(Context context)
focal_class.identifier: getBundleService
focal_class.modifiers: public static
focal_class.parameters: (Context context)
focal_class.return: BundleService
focal_class.signature: BundleService getBundleService(Context context)
focal_class.class_method_signature: BundleService.getBundleService(MortarScope scope)
focal_class.full_signature: public static BundleService getBundleService(MortarScope scope)
focal_class.identifier: getBundleService
focal_class.modifiers: public static
focal_class.parameters: (MortarScope scope)
focal_class.return: BundleService
focal_class.signature: BundleService getBundleService(MortarScope scope)
focal_class.class_method_signature: BundleService.register(Bundler bundler)
focal_class.full_signature: public void register(Bundler bundler)
focal_class.identifier: register
focal_class.modifiers: public
focal_class.parameters: (Bundler bundler)
focal_class.return: void
focal_class.signature: void register(Bundler bundler)
focal_class.class_method_signature: BundleService.init()
focal_class.full_signature:  void init()
focal_class.identifier: init
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: BundleService.needsLoading()
focal_class.full_signature:  boolean needsLoading()
focal_class.identifier: needsLoading
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean needsLoading()
focal_class.class_method_signature: BundleService.loadOne()
focal_class.full_signature:  void loadOne()
focal_class.identifier: loadOne
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void loadOne()
focal_class.class_method_signature: BundleService.updateScopedBundleOnCreate(Bundle rootBundle)
focal_class.full_signature:  boolean updateScopedBundleOnCreate(Bundle rootBundle)
focal_class.identifier: updateScopedBundleOnCreate
focal_class.parameters: (Bundle rootBundle)
focal_class.return: boolean
focal_class.signature: boolean updateScopedBundleOnCreate(Bundle rootBundle)
focal_class.class_method_signature: BundleService.findScopeBundle(Bundle root)
focal_class.full_signature: private Bundle findScopeBundle(Bundle root)
focal_class.identifier: findScopeBundle
focal_class.modifiers: private
focal_class.parameters: (Bundle root)
focal_class.return: Bundle
focal_class.signature: Bundle findScopeBundle(Bundle root)
focal_class.class_method_signature: BundleService.saveToRootBundle(Bundle rootBundle)
focal_class.full_signature:  void saveToRootBundle(Bundle rootBundle)
focal_class.identifier: saveToRootBundle
focal_class.parameters: (Bundle rootBundle)
focal_class.return: void
focal_class.signature: void saveToRootBundle(Bundle rootBundle)
focal_method.body: public void register(Bundler bundler) {
      if (bundler == null) throw new NullPointerException("Cannot register null bundler.");
  
      if (runner.state == BundleServiceRunner.State.SAVING) {
        throw new IllegalStateException("Cannot register during onSave");
      }
  
      if (bundlers.add(bundler)) bundler.onEnterScope(scope);
      String mortarBundleKey = bundler.getMortarBundleKey();
      if (mortarBundleKey == null || mortarBundleKey.trim().equals("")) {
        throw new IllegalArgumentException(format("%s has null or empty bundle key", bundler));
      }
  
      switch (runner.state) {
        case IDLE:
          toBeLoaded.add(bundler);
          runner.servicesToBeLoaded.add(this);
          runner.finishLoading();
          break;
        case LOADING:
          if (!toBeLoaded.contains(bundler)) {
            toBeLoaded.add(bundler);
            runner.servicesToBeLoaded.add(this);
          }
          break;
  
        default:
          throw new AssertionError("Unexpected state " + runner.state);
      }
    }
focal_method.class_method_signature: BundleService.register(Bundler bundler)
focal_method.full_signature: public void register(Bundler bundler)
focal_method.identifier: register
focal_method.invocations: add onEnterScope getMortarBundleKey equals trim format add add finishLoading contains add add
focal_method.modifiers: public
focal_method.parameters: (Bundler bundler)
focal_method.return: void
focal_method.signature: void register(Bundler bundler)