test_class.file: nvadaemon/src/test/java/com/microsoft/azure/practices/nvadaemon/NvaMonitorTest.java
test_class.identifier: NvaMonitorTest
test_case.body: @Test
      void testMonitorExceptionConstructor() {
          List<MonitorConfiguration> monitors = new ArrayList<>();
          Map<String, Object> settings = new HashMap<>();
          settings.put("constructorShouldThrowException", "true");
          settings.put("initShouldCauseInterrupt", "false");
          monitors.add(
              new MonitorConfiguration(
                  "com.microsoft.azure.practices.nvadaemon.NvaMonitorTest$MonitorValidConstructor",
                  settings));
          DaemonConfiguration daemonConfiguration = new DaemonConfiguration(monitors, null);
          NvaMonitor nvaMonitor = new NvaMonitor(daemonConfiguration);
          Assertions.assertThrows(NvaMonitor.NvaMonitorException.class,
              () -> nvaMonitor.start());
      }
test_case.class_method_signature: NvaMonitorTest.testMonitorExceptionConstructor()
test_case.full_signature: @Test void testMonitorExceptionConstructor()
test_case.identifier: testMonitorExceptionConstructor
test_case.invocations: put put add assertThrows start
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMonitorExceptionConstructor()
focal_class.declarator: log = LoggerFactory.getLogger(NvaMonitor.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(NvaMonitor.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: configuration
focal_class.modifier: private final
focal_class.original_string: private final DaemonConfiguration configuration;
focal_class.type: DaemonConfiguration
focal_class.var_name: configuration
focal_class.declarator: executorService
focal_class.modifier: private final
focal_class.original_string: private final ExecutorService executorService;
focal_class.type: ExecutorService
focal_class.var_name: executorService
focal_class.declarator: lock = new ReentrantLock()
focal_class.modifier: private final
focal_class.original_string: private final ReentrantLock lock = new ReentrantLock();
focal_class.type: ReentrantLock
focal_class.var_name: lock
focal_class.declarator: shutdown = lock.newCondition()
focal_class.modifier: private final
focal_class.original_string: private final Condition shutdown = lock.newCondition();
focal_class.type: Condition
focal_class.var_name: shutdown
focal_class.declarator: isRunning = false
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean isRunning = false;
focal_class.type: boolean
focal_class.var_name: isRunning
focal_class.file: nvadaemon/src/main/java/com/microsoft/azure/practices/nvadaemon/NvaMonitor.java
focal_class.identifier: NvaMonitor
focal_class.interfaces: implements AutoCloseable
focal_class.class_method_signature: NvaMonitor.NvaMonitor(DaemonConfiguration configuration)
focal_class.full_signature: public  NvaMonitor(DaemonConfiguration configuration)
focal_class.identifier: NvaMonitor
focal_class.modifiers: public
focal_class.parameters: (DaemonConfiguration configuration)
focal_class.signature:  NvaMonitor(DaemonConfiguration configuration)
focal_class.class_method_signature: NvaMonitor.createMonitorCallable(MonitorConfiguration monitorConfiguration)
focal_class.full_signature: @SuppressWarnings("unchecked") private Callable<Void> createMonitorCallable(MonitorConfiguration monitorConfiguration)
focal_class.identifier: createMonitorCallable
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (MonitorConfiguration monitorConfiguration)
focal_class.return: Callable<Void>
focal_class.signature: Callable<Void> createMonitorCallable(MonitorConfiguration monitorConfiguration)
focal_class.class_method_signature: NvaMonitor.start()
focal_class.full_signature: public synchronized Future<Void> start()
focal_class.identifier: start
focal_class.modifiers: public synchronized
focal_class.parameters: ()
focal_class.return: Future<Void>
focal_class.signature: Future<Void> start()
focal_class.class_method_signature: NvaMonitor.stop()
focal_class.full_signature: public synchronized void stop()
focal_class.identifier: stop
focal_class.modifiers: public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: NvaMonitor.close()
focal_class.full_signature: @Override public synchronized void close()
focal_class.identifier: close
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: public synchronized Future<Void> start() throws NvaMonitorException {
          //log.debug("executorService.isShutdown(): " + executorService.isShutdown());
          //Preconditions.checkState(!executorService.isShutdown(), "Already started");
          Preconditions.checkState(!this.isRunning, "Already started");
          // We need to eventually support multiple monitors, but for now, just grab the
          // first one.
          MonitorConfiguration monitorConfiguration =
              this.configuration.getMonitors().get(0);
          Callable<Void> monitor = createMonitorCallable(monitorConfiguration);
          isRunning = true;
          Future<Void> task = executorService.submit(
              monitor
          );
  
          return task;
      }
focal_method.class_method_signature: NvaMonitor.start()
focal_method.full_signature: public synchronized Future<Void> start()
focal_method.identifier: start
focal_method.invocations: checkState get getMonitors createMonitorCallable submit
focal_method.modifiers: public synchronized
focal_method.parameters: ()
focal_method.return: Future<Void>
focal_method.signature: Future<Void> start()