test_class.file: smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessCountTableManager.java
test_class.identifier: TestAccessCountTableManager
test_class.superclass: extends DBTest
test_case.body: @Test
    public void testGetTablesCornerCase2() throws MetaStoreException {
      MetaStore adapter = mock(MetaStore.class);
      TableEvictor tableEvictor = new CountEvictor(adapter, 20);
      Map<TimeGranularity, AccessCountTableDeque> map = new HashMap<>();
      AccessCountTableDeque minute = new AccessCountTableDeque(tableEvictor);
      AccessCountTable firstMinute =
        new AccessCountTable(0L, Constants.ONE_MINUTE_IN_MILLIS);
      minute.addAndNotifyListener(firstMinute);
      map.put(TimeGranularity.MINUTE, minute);
  
      AccessCountTableDeque secondDeque = new AccessCountTableDeque(tableEvictor);
      AccessCountTable firstFiveSeconds =
          new AccessCountTable(
              55 * Constants.ONE_SECOND_IN_MILLIS, 60 * Constants.ONE_SECOND_IN_MILLIS);
      AccessCountTable secondFiveSeconds =
        new AccessCountTable(60 * Constants.ONE_SECOND_IN_MILLIS,
          65 * Constants.ONE_SECOND_IN_MILLIS);
      AccessCountTable thirdFiveSeconds =
        new AccessCountTable(110 * Constants.ONE_SECOND_IN_MILLIS,
          115 * Constants.ONE_SECOND_IN_MILLIS);
      secondDeque.addAndNotifyListener(firstFiveSeconds);
      secondDeque.addAndNotifyListener(secondFiveSeconds);
      secondDeque.addAndNotifyListener(thirdFiveSeconds);
      map.put(TimeGranularity.SECOND, secondDeque);
  
      List<AccessCountTable> result = AccessCountTableManager.getTables(map, adapter,
        Constants.ONE_MINUTE_IN_MILLIS);
      Assert.assertTrue(result.size() == 3);
      Assert.assertTrue(result.get(0).equals(firstFiveSeconds));
      Assert.assertFalse(result.get(0).isEphemeral());
      Assert.assertTrue(result.get(1).equals(secondFiveSeconds));
      Assert.assertTrue(result.get(2).equals(thirdFiveSeconds));
    }
test_case.class_method_signature: TestAccessCountTableManager.testGetTablesCornerCase2()
test_case.full_signature: @Test public void testGetTablesCornerCase2()
test_case.identifier: testGetTablesCornerCase2
test_case.invocations: mock addAndNotifyListener put addAndNotifyListener addAndNotifyListener addAndNotifyListener put getTables assertTrue size assertTrue equals get assertFalse isEphemeral get assertTrue equals get assertTrue equals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetTablesCornerCase2()
focal_class.declarator: NUM_DAY_TABLES_TO_KEEP = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_DAY_TABLES_TO_KEEP = 30;
focal_class.type: int
focal_class.var_name: NUM_DAY_TABLES_TO_KEEP
focal_class.declarator: NUM_HOUR_TABLES_TO_KEEP = 48
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_HOUR_TABLES_TO_KEEP = 48;
focal_class.type: int
focal_class.var_name: NUM_HOUR_TABLES_TO_KEEP
focal_class.declarator: NUM_MINUTE_TABLES_TO_KEEP = 120
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_MINUTE_TABLES_TO_KEEP = 120;
focal_class.type: int
focal_class.var_name: NUM_MINUTE_TABLES_TO_KEEP
focal_class.declarator: NUM_SECOND_TABLES_TO_KEEP = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_SECOND_TABLES_TO_KEEP = 30;
focal_class.type: int
focal_class.var_name: NUM_SECOND_TABLES_TO_KEEP
focal_class.declarator: metaStore
focal_class.modifier: private
focal_class.original_string: private MetaStore metaStore;
focal_class.type: MetaStore
focal_class.var_name: metaStore
focal_class.declarator: tableDeques
focal_class.modifier: private
focal_class.original_string: private Map<TimeGranularity, AccessCountTableDeque> tableDeques;
focal_class.type: Map<TimeGranularity, AccessCountTableDeque>
focal_class.var_name: tableDeques
focal_class.declarator: secondTableDeque
focal_class.modifier: private
focal_class.original_string: private AccessCountTableDeque secondTableDeque;
focal_class.type: AccessCountTableDeque
focal_class.var_name: secondTableDeque
focal_class.declarator: accessEventAggregator
focal_class.modifier: private
focal_class.original_string: private AccessEventAggregator accessEventAggregator;
focal_class.type: AccessEventAggregator
focal_class.var_name: accessEventAggregator
focal_class.declarator: executorService
focal_class.modifier: private
focal_class.original_string: private ExecutorService executorService;
focal_class.type: ExecutorService
focal_class.var_name: executorService
focal_class.declarator: LOG =
        LoggerFactory.getLogger(AccessCountTableManager.class)
focal_class.modifier: public static final
focal_class.original_string: public static final Logger LOG =
        LoggerFactory.getLogger(AccessCountTableManager.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTableManager.java
focal_class.identifier: AccessCountTableManager
focal_class.class_method_signature: AccessCountTableManager.AccessCountTableManager(MetaStore adapter)
focal_class.full_signature: public  AccessCountTableManager(MetaStore adapter)
focal_class.identifier: AccessCountTableManager
focal_class.modifiers: public
focal_class.parameters: (MetaStore adapter)
focal_class.signature:  AccessCountTableManager(MetaStore adapter)
focal_class.class_method_signature: AccessCountTableManager.AccessCountTableManager(MetaStore adapter, ExecutorService service)
focal_class.full_signature: public  AccessCountTableManager(MetaStore adapter, ExecutorService service)
focal_class.identifier: AccessCountTableManager
focal_class.modifiers: public
focal_class.parameters: (MetaStore adapter, ExecutorService service)
focal_class.signature:  AccessCountTableManager(MetaStore adapter, ExecutorService service)
focal_class.class_method_signature: AccessCountTableManager.initTables()
focal_class.full_signature: private void initTables()
focal_class.identifier: initTables
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initTables()
focal_class.class_method_signature: AccessCountTableManager.recoverTables()
focal_class.full_signature: private void recoverTables()
focal_class.identifier: recoverTables
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void recoverTables()
focal_class.class_method_signature: AccessCountTableManager.addTable(AccessCountTable accessCountTable)
focal_class.full_signature: public void addTable(AccessCountTable accessCountTable)
focal_class.identifier: addTable
focal_class.modifiers: public
focal_class.parameters: (AccessCountTable accessCountTable)
focal_class.return: void
focal_class.signature: void addTable(AccessCountTable accessCountTable)
focal_class.class_method_signature: AccessCountTableManager.onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_class.full_signature: public void onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_class.identifier: onAccessEventsArrived
focal_class.modifiers: public
focal_class.parameters: (List<FileAccessEvent> accessEvents)
focal_class.return: void
focal_class.signature: void onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_class.class_method_signature: AccessCountTableManager.getTables(long lengthInMillis)
focal_class.full_signature: public List<AccessCountTable> getTables(long lengthInMillis)
focal_class.identifier: getTables
focal_class.modifiers: public
focal_class.parameters: (long lengthInMillis)
focal_class.return: List<AccessCountTable>
focal_class.signature: List<AccessCountTable> getTables(long lengthInMillis)
focal_class.class_method_signature: AccessCountTableManager.getTables(
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.full_signature: public static List<AccessCountTable> getTables(
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.identifier: getTables
focal_class.modifiers: public static
focal_class.parameters: (
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.return: List<AccessCountTable>
focal_class.signature: List<AccessCountTable> getTables(
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.class_method_signature: AccessCountTableManager.getTablesDuring(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.full_signature: private static List<AccessCountTable> getTablesDuring(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.identifier: getTablesDuring
focal_class.modifiers: private static
focal_class.parameters: (
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.return: List<AccessCountTable>
focal_class.signature: List<AccessCountTable> getTablesDuring(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.class_method_signature: AccessCountTableManager.tableExists(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.full_signature: private static boolean tableExists(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.identifier: tableExists
focal_class.modifiers: private static
focal_class.parameters: (
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.return: boolean
focal_class.signature: boolean tableExists(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.class_method_signature: AccessCountTableManager.getTableDeques()
focal_class.full_signature: @VisibleForTesting Map<TimeGranularity, AccessCountTableDeque> getTableDeques()
focal_class.identifier: getTableDeques
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: ()
focal_class.return: Map<TimeGranularity, AccessCountTableDeque>
focal_class.signature: Map<TimeGranularity, AccessCountTableDeque> getTableDeques()
focal_method.body: public List<AccessCountTable> getTables(long lengthInMillis) throws MetaStoreException {
      return AccessCountTableManager.getTables(this.tableDeques, this.metaStore, lengthInMillis);
    }
focal_method.class_method_signature: AccessCountTableManager.getTables(long lengthInMillis)
focal_method.full_signature: public List<AccessCountTable> getTables(long lengthInMillis)
focal_method.identifier: getTables
focal_method.invocations: getTables
focal_method.modifiers: public
focal_method.parameters: (long lengthInMillis)
focal_method.return: List<AccessCountTable>
focal_method.signature: List<AccessCountTable> getTables(long lengthInMillis)