test_class.declarator: context = new OsgiContext()
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final OsgiContext context = new OsgiContext();
test_class.type: OsgiContext
test_class.var_name: context
test_class.declarator: service = new StatisticsProviderFactory()
test_class.modifier: private
test_class.original_string: private StatisticsProviderFactory service = new StatisticsProviderFactory();
test_class.type: StatisticsProviderFactory
test_class.var_name: service
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactoryTest.java
test_class.identifier: StatisticsProviderFactoryTest
test_case.body: @Test
      public void defaultMode() throws Exception {
          MockOsgi.activate(service, context.bundleContext(), ImmutableMap.<String, Object>of("providerType", "DEFAULT"));
          assertTrue(context.getService(StatisticsProvider.class) instanceof DefaultStatisticsProvider);
      }
test_case.class_method_signature: StatisticsProviderFactoryTest.defaultMode()
test_case.full_signature: @Test public void defaultMode()
test_case.identifier: defaultMode
test_case.invocations: activate bundleContext of assertTrue getService
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void defaultMode()
focal_class.declarator: TYPE_DEFAULT = "DEFAULT"
focal_class.modifier: private static final
focal_class.original_string: private static final String TYPE_DEFAULT = "DEFAULT";
focal_class.type: String
focal_class.var_name: TYPE_DEFAULT
focal_class.declarator: TYPE_METRIC = "METRIC"
focal_class.modifier: private static final
focal_class.original_string: private static final String TYPE_METRIC = "METRIC";
focal_class.type: String
focal_class.var_name: TYPE_METRIC
focal_class.declarator: TYPE_NONE = "NONE"
focal_class.modifier: private static final
focal_class.original_string: private static final String TYPE_NONE = "NONE";
focal_class.type: String
focal_class.var_name: TYPE_NONE
focal_class.declarator: TYPE_AUTO = "AUTO"
focal_class.modifier: private static final
focal_class.original_string: private static final String TYPE_AUTO = "AUTO";
focal_class.type: String
focal_class.var_name: TYPE_AUTO
focal_class.declarator: METRIC_PROVIDER_CLASS =
              "com.codahale.metrics.MetricRegistry"
focal_class.modifier: private static final
focal_class.original_string: private static final String METRIC_PROVIDER_CLASS =
              "com.codahale.metrics.MetricRegistry";
focal_class.type: String
focal_class.var_name: METRIC_PROVIDER_CLASS
focal_class.declarator: log = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: server
focal_class.modifier: @Reference(cardinality = ReferenceCardinality.OPTIONAL)
      private
focal_class.original_string: @Reference(cardinality = ReferenceCardinality.OPTIONAL)
      private MBeanServer server;
focal_class.type: MBeanServer
focal_class.var_name: server
focal_class.declarator: statisticsProvider
focal_class.modifier: private
focal_class.original_string: private StatisticsProvider statisticsProvider;
focal_class.type: StatisticsProvider
focal_class.var_name: statisticsProvider
focal_class.declarator: regs = Lists.newArrayList()
focal_class.modifier: private
focal_class.original_string: private List<ServiceRegistration> regs = Lists.newArrayList();
focal_class.type: List<ServiceRegistration>
focal_class.var_name: regs
focal_class.declarator: executor
focal_class.modifier: private
focal_class.original_string: private ScheduledExecutorService executor;
focal_class.type: ScheduledExecutorService
focal_class.var_name: executor
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.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/metric/StatisticsProviderFactory.java
focal_class.identifier: StatisticsProviderFactory
focal_class.class_method_signature: StatisticsProviderFactory.activate(BundleContext context, Configuration config)
focal_class.full_signature: @Activate private void activate(BundleContext context, Configuration config)
focal_class.identifier: activate
focal_class.modifiers: @Activate private
focal_class.parameters: (BundleContext context, Configuration config)
focal_class.return: void
focal_class.signature: void activate(BundleContext context, Configuration config)
focal_class.class_method_signature: StatisticsProviderFactory.deactivate()
focal_class.full_signature: @Deactivate private void deactivate()
focal_class.identifier: deactivate
focal_class.modifiers: @Deactivate private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deactivate()
focal_class.class_method_signature: StatisticsProviderFactory.createProvider(String providerType)
focal_class.full_signature: private StatisticsProvider createProvider(String providerType)
focal_class.identifier: createProvider
focal_class.modifiers: private
focal_class.parameters: (String providerType)
focal_class.return: StatisticsProvider
focal_class.signature: StatisticsProvider createProvider(String providerType)
focal_class.class_method_signature: StatisticsProviderFactory.createMetricsProvider(ScheduledExecutorService executor)
focal_class.full_signature: private StatisticsProvider createMetricsProvider(ScheduledExecutorService executor)
focal_class.identifier: createMetricsProvider
focal_class.modifiers: private
focal_class.parameters: (ScheduledExecutorService executor)
focal_class.return: StatisticsProvider
focal_class.signature: StatisticsProvider createMetricsProvider(ScheduledExecutorService executor)
focal_class.class_method_signature: StatisticsProviderFactory.isMetricSupportPresent()
focal_class.full_signature: private boolean isMetricSupportPresent()
focal_class.identifier: isMetricSupportPresent
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isMetricSupportPresent()
focal_method.body: @Activate
      private void activate(BundleContext context, Configuration config) {
          this.bundleContext = context;
          statisticsProvider = createProvider(config.providerType());
  
          if (statisticsProvider != null) {
              regs.add(context.registerService(StatisticsProvider.class.getName(),
                      statisticsProvider, null));
          }
      }
focal_method.class_method_signature: StatisticsProviderFactory.activate(BundleContext context, Configuration config)
focal_method.full_signature: @Activate private void activate(BundleContext context, Configuration config)
focal_method.identifier: activate
focal_method.invocations: createProvider providerType add registerService getName
focal_method.modifiers: @Activate private
focal_method.parameters: (BundleContext context, Configuration config)
focal_method.return: void
focal_method.signature: void activate(BundleContext context, Configuration config)