test_class.declarator: scheduler = new SchedulerImpl()
test_class.modifier: private
test_class.original_string: private SchedulerImpl scheduler = new SchedulerImpl();
test_class.type: SchedulerImpl
test_class.var_name: scheduler
test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/internal/scheduler/SchedulerImplTest.java
test_class.identifier: SchedulerImplTest
test_case.body: @Test
      @Timeout(value = 300, unit = TimeUnit.MILLISECONDS)
      public void testNegative() throws InterruptedException {
          Semaphore s = new Semaphore(0);
          scheduler.after(() -> {
              s.release(1);
              return null;
          }, Duration.ofMillis(-1000));
          Thread.sleep(200);
          assertEquals(1, s.availablePermits(), "Negative value should mean after finished right away");
      }
test_case.class_method_signature: SchedulerImplTest.testNegative()
test_case.full_signature: @Test @Timeout(value = 300, unit = TimeUnit.MILLISECONDS) public void testNegative()
test_case.identifier: testNegative
test_case.invocations: after release ofMillis sleep assertEquals availablePermits
test_case.modifiers: @Test @Timeout(value = 300, unit = TimeUnit.MILLISECONDS) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNegative()
focal_class.declarator: SCHEDULER_THREAD_POOL = "scheduler"
focal_class.modifier: private static final
focal_class.original_string: private static final String SCHEDULER_THREAD_POOL = "scheduler";
focal_class.type: String
focal_class.var_name: SCHEDULER_THREAD_POOL
focal_class.declarator: logger = LoggerFactory.getLogger(SchedulerImpl.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(SchedulerImpl.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: clock = Clock.systemDefaultZone()
focal_class.modifier: private final
focal_class.original_string: private final Clock clock = Clock.systemDefaultZone();
focal_class.type: Clock
focal_class.var_name: clock
focal_class.declarator: executor = ThreadPoolManager.getScheduledPool(SCHEDULER_THREAD_POOL)
focal_class.modifier: private final
focal_class.original_string: private final ScheduledExecutorService executor = ThreadPoolManager.getScheduledPool(SCHEDULER_THREAD_POOL);
focal_class.type: ScheduledExecutorService
focal_class.var_name: executor
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/internal/scheduler/SchedulerImpl.java
focal_class.identifier: SchedulerImpl
focal_class.interfaces: implements Scheduler
focal_class.class_method_signature: SchedulerImpl.after(Duration duration)
focal_class.full_signature: @Override public ScheduledCompletableFuture<Instant> after(Duration duration)
focal_class.identifier: after
focal_class.modifiers: @Override public
focal_class.parameters: (Duration duration)
focal_class.return: ScheduledCompletableFuture<Instant>
focal_class.signature: ScheduledCompletableFuture<Instant> after(Duration duration)
focal_class.class_method_signature: SchedulerImpl.after(Callable<T> callable, Duration duration)
focal_class.full_signature: @Override public ScheduledCompletableFuture<T> after(Callable<T> callable, Duration duration)
focal_class.identifier: after
focal_class.modifiers: @Override public
focal_class.parameters: (Callable<T> callable, Duration duration)
focal_class.return: ScheduledCompletableFuture<T>
focal_class.signature: ScheduledCompletableFuture<T> after(Callable<T> callable, Duration duration)
focal_class.class_method_signature: SchedulerImpl.afterInternal(ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Duration duration)
focal_class.full_signature: private ScheduledCompletableFutureOnce<T> afterInternal(ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Duration duration)
focal_class.identifier: afterInternal
focal_class.modifiers: private
focal_class.parameters: (ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Duration duration)
focal_class.return: ScheduledCompletableFutureOnce<T>
focal_class.signature: ScheduledCompletableFutureOnce<T> afterInternal(ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Duration duration)
focal_class.class_method_signature: SchedulerImpl.before(CompletableFuture<T> promise, Duration timeout)
focal_class.full_signature: @Override public ScheduledCompletableFuture<T> before(CompletableFuture<T> promise, Duration timeout)
focal_class.identifier: before
focal_class.modifiers: @Override public
focal_class.parameters: (CompletableFuture<T> promise, Duration timeout)
focal_class.return: ScheduledCompletableFuture<T>
focal_class.signature: ScheduledCompletableFuture<T> before(CompletableFuture<T> promise, Duration timeout)
focal_class.class_method_signature: SchedulerImpl.at(Instant instant)
focal_class.full_signature: @Override public ScheduledCompletableFuture<Instant> at(Instant instant)
focal_class.identifier: at
focal_class.modifiers: @Override public
focal_class.parameters: (Instant instant)
focal_class.return: ScheduledCompletableFuture<Instant>
focal_class.signature: ScheduledCompletableFuture<Instant> at(Instant instant)
focal_class.class_method_signature: SchedulerImpl.at(Callable<T> callable, Instant instant)
focal_class.full_signature: @Override public ScheduledCompletableFuture<T> at(Callable<T> callable, Instant instant)
focal_class.identifier: at
focal_class.modifiers: @Override public
focal_class.parameters: (Callable<T> callable, Instant instant)
focal_class.return: ScheduledCompletableFuture<T>
focal_class.signature: ScheduledCompletableFuture<T> at(Callable<T> callable, Instant instant)
focal_class.class_method_signature: SchedulerImpl.atInternal(ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Instant instant)
focal_class.full_signature: private ScheduledCompletableFuture<T> atInternal(ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Instant instant)
focal_class.identifier: atInternal
focal_class.modifiers: private
focal_class.parameters: (ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Instant instant)
focal_class.return: ScheduledCompletableFuture<T>
focal_class.signature: ScheduledCompletableFuture<T> atInternal(ScheduledCompletableFutureOnce<T> deferred,
              Callable<T> callable, Instant instant)
focal_class.class_method_signature: SchedulerImpl.schedule(SchedulerRunnable runnable, TemporalAdjuster temporalAdjuster)
focal_class.full_signature: @Override public ScheduledCompletableFuture<T> schedule(SchedulerRunnable runnable, TemporalAdjuster temporalAdjuster)
focal_class.identifier: schedule
focal_class.modifiers: @Override public
focal_class.parameters: (SchedulerRunnable runnable, TemporalAdjuster temporalAdjuster)
focal_class.return: ScheduledCompletableFuture<T>
focal_class.signature: ScheduledCompletableFuture<T> schedule(SchedulerRunnable runnable, TemporalAdjuster temporalAdjuster)
focal_class.class_method_signature: SchedulerImpl.schedule(ScheduledCompletableFutureRecurring<T> schedule, SchedulerRunnable runnable,
              TemporalAdjuster temporalAdjuster)
focal_class.full_signature: private void schedule(ScheduledCompletableFutureRecurring<T> schedule, SchedulerRunnable runnable,
              TemporalAdjuster temporalAdjuster)
focal_class.identifier: schedule
focal_class.modifiers: private
focal_class.parameters: (ScheduledCompletableFutureRecurring<T> schedule, SchedulerRunnable runnable,
              TemporalAdjuster temporalAdjuster)
focal_class.return: void
focal_class.signature: void schedule(ScheduledCompletableFutureRecurring<T> schedule, SchedulerRunnable runnable,
              TemporalAdjuster temporalAdjuster)
focal_method.body: @Override
      public ScheduledCompletableFuture<Instant> after(Duration duration) {
          final Instant start = Instant.now();
          return after(() -> start, duration);
      }
focal_method.class_method_signature: SchedulerImpl.after(Duration duration)
focal_method.full_signature: @Override public ScheduledCompletableFuture<Instant> after(Duration duration)
focal_method.identifier: after
focal_method.invocations: now after
focal_method.modifiers: @Override public
focal_method.parameters: (Duration duration)
focal_method.return: ScheduledCompletableFuture<Instant>
focal_method.signature: ScheduledCompletableFuture<Instant> after(Duration duration)