test_class.declarator: logger
test_class.modifier: private
test_class.original_string: private IntervalRegistryLogger logger;
test_class.type: IntervalRegistryLogger
test_class.var_name: logger
test_class.declarator: requestRegistry = mock(HostRequestIntervalRegistry.class)
test_class.modifier: private
test_class.original_string: private HostRequestIntervalRegistry requestRegistry = mock(HostRequestIntervalRegistry.class);
test_class.type: HostRequestIntervalRegistry
test_class.var_name: requestRegistry
test_class.file: common/transport/src/test/java/com/hashmapinc/server/common/transport/quota/inmemory/IntervalRegistryLoggerTest.java
test_class.identifier: IntervalRegistryLoggerTest
test_case.body: @Test
      public void emptyMapProcessedCorrectly() {
          Map<String, Long> map = Collections.emptyMap();
          Map<String, Long> actual = logger.getTopElements(map);
          Map<String, Long> expected = Collections.emptyMap();
  
          assertEquals(expected, actual);
      }
test_case.class_method_signature: IntervalRegistryLoggerTest.emptyMapProcessedCorrectly()
test_case.full_signature: @Test public void emptyMapProcessedCorrectly()
test_case.identifier: emptyMapProcessedCorrectly
test_case.invocations: emptyMap getTopElements emptyMap assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void emptyMapProcessedCorrectly()
focal_class.declarator: topSize
focal_class.modifier: private final
focal_class.original_string: private final int topSize;
focal_class.type: int
focal_class.var_name: topSize
focal_class.declarator: intervalRegistry
focal_class.modifier: private final
focal_class.original_string: private final HostRequestIntervalRegistry intervalRegistry;
focal_class.type: HostRequestIntervalRegistry
focal_class.var_name: intervalRegistry
focal_class.declarator: logIntervalMin
focal_class.modifier: private final
focal_class.original_string: private final long logIntervalMin;
focal_class.type: long
focal_class.var_name: logIntervalMin
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.file: common/transport/src/main/java/com/hashmapinc/server/common/transport/quota/inmemory/IntervalRegistryLogger.java
focal_class.identifier: IntervalRegistryLogger
focal_class.class_method_signature: IntervalRegistryLogger.IntervalRegistryLogger(@Value("${quota.log.topSize}") int topSize, @Value("${quota.log.intervalMin}") long logIntervalMin,
                                    HostRequestIntervalRegistry intervalRegistry)
focal_class.full_signature: public  IntervalRegistryLogger(@Value("${quota.log.topSize}") int topSize, @Value("${quota.log.intervalMin}") long logIntervalMin,
                                    HostRequestIntervalRegistry intervalRegistry)
focal_class.identifier: IntervalRegistryLogger
focal_class.modifiers: public
focal_class.parameters: (@Value("${quota.log.topSize}") int topSize, @Value("${quota.log.intervalMin}") long logIntervalMin,
                                    HostRequestIntervalRegistry intervalRegistry)
focal_class.signature:  IntervalRegistryLogger(@Value("${quota.log.topSize}") int topSize, @Value("${quota.log.intervalMin}") long logIntervalMin,
                                    HostRequestIntervalRegistry intervalRegistry)
focal_class.class_method_signature: IntervalRegistryLogger.schedule()
focal_class.full_signature: public void schedule()
focal_class.identifier: schedule
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void schedule()
focal_class.class_method_signature: IntervalRegistryLogger.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: IntervalRegistryLogger.logStatistic()
focal_class.full_signature: public void logStatistic()
focal_class.identifier: logStatistic
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void logStatistic()
focal_class.class_method_signature: IntervalRegistryLogger.getTopElements(Map<String, Long> countMap)
focal_class.full_signature: protected Map<String, Long> getTopElements(Map<String, Long> countMap)
focal_class.identifier: getTopElements
focal_class.modifiers: protected
focal_class.parameters: (Map<String, Long> countMap)
focal_class.return: Map<String, Long>
focal_class.signature: Map<String, Long> getTopElements(Map<String, Long> countMap)
focal_class.class_method_signature: IntervalRegistryLogger.log(Map<String, Long> top, int uniqHosts, long requestsCount)
focal_class.full_signature: private void log(Map<String, Long> top, int uniqHosts, long requestsCount)
focal_class.identifier: log
focal_class.modifiers: private
focal_class.parameters: (Map<String, Long> top, int uniqHosts, long requestsCount)
focal_class.return: void
focal_class.signature: void log(Map<String, Long> top, int uniqHosts, long requestsCount)
focal_method.body: protected Map<String, Long> getTopElements(Map<String, Long> countMap) {
          MinMaxPriorityQueue<Map.Entry<String, Long>> topQueue = MinMaxPriorityQueue
                  .orderedBy(Comparator.comparing((Function<Map.Entry<String, Long>, Long>) Map.Entry::getValue).reversed())
                  .maximumSize(topSize)
                  .create(countMap.entrySet());
  
          return topQueue.stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
      }
focal_method.class_method_signature: IntervalRegistryLogger.getTopElements(Map<String, Long> countMap)
focal_method.full_signature: protected Map<String, Long> getTopElements(Map<String, Long> countMap)
focal_method.identifier: getTopElements
focal_method.invocations: create maximumSize orderedBy reversed comparing entrySet collect stream toMap
focal_method.modifiers: protected
focal_method.parameters: (Map<String, Long> countMap)
focal_method.return: Map<String, Long>
focal_method.signature: Map<String, Long> getTopElements(Map<String, Long> countMap)