test_class.declarator: scheduler = new DelayedTaskQueue()
test_class.modifier: private
test_class.original_string: private DelayedTaskQueue scheduler = new DelayedTaskQueue();
test_class.type: DelayedTaskQueue
test_class.var_name: scheduler
test_class.declarator: executed = new ArrayList<DelayedTask>()
test_class.modifier: private
test_class.original_string: private ArrayList<DelayedTask> executed = new ArrayList<DelayedTask>();
test_class.type: ArrayList<DelayedTask>
test_class.var_name: executed
test_class.file: clients/src/test/java/org/apache/kafka/clients/consumer/internals/DelayedTaskQueueTest.java
test_class.identifier: DelayedTaskQueueTest
test_case.body: @Test
      public void testRemove() {
          TestTask task1 = new TestTask();
          TestTask task2 = new TestTask();
          TestTask task3 = new TestTask();
          scheduler.add(task1, 20);
          scheduler.add(task2, 10);
          scheduler.add(task3, 30);
          scheduler.add(task1, 40);
          assertEquals(10, scheduler.nextTimeout(0));
  
          scheduler.remove(task2);
          assertEquals(20, scheduler.nextTimeout(0));
  
          scheduler.remove(task1);
          assertEquals(30, scheduler.nextTimeout(0));
  
          scheduler.remove(task3);
          assertEquals(Long.MAX_VALUE, scheduler.nextTimeout(0));
      }
test_case.class_method_signature: DelayedTaskQueueTest.testRemove()
test_case.full_signature: @Test public void testRemove()
test_case.identifier: testRemove
test_case.invocations: add add add add assertEquals nextTimeout remove assertEquals nextTimeout remove assertEquals nextTimeout remove assertEquals nextTimeout
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRemove()
focal_class.declarator: tasks
focal_class.modifier: private
focal_class.original_string: private PriorityQueue<Entry> tasks;
focal_class.type: PriorityQueue<Entry>
focal_class.var_name: tasks
focal_class.file: clients/src/main/java/org/apache/kafka/clients/consumer/internals/DelayedTaskQueue.java
focal_class.identifier: DelayedTaskQueue
focal_class.class_method_signature: DelayedTaskQueue.DelayedTaskQueue()
focal_class.full_signature: public  DelayedTaskQueue()
focal_class.identifier: DelayedTaskQueue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DelayedTaskQueue()
focal_class.class_method_signature: DelayedTaskQueue.add(DelayedTask task, long at)
focal_class.full_signature: public void add(DelayedTask task, long at)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (DelayedTask task, long at)
focal_class.return: void
focal_class.signature: void add(DelayedTask task, long at)
focal_class.class_method_signature: DelayedTaskQueue.remove(DelayedTask task)
focal_class.full_signature: public boolean remove(DelayedTask task)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (DelayedTask task)
focal_class.return: boolean
focal_class.signature: boolean remove(DelayedTask task)
focal_class.class_method_signature: DelayedTaskQueue.nextTimeout(long now)
focal_class.full_signature: public long nextTimeout(long now)
focal_class.identifier: nextTimeout
focal_class.modifiers: public
focal_class.parameters: (long now)
focal_class.return: long
focal_class.signature: long nextTimeout(long now)
focal_class.class_method_signature: DelayedTaskQueue.poll(long now)
focal_class.full_signature: public void poll(long now)
focal_class.identifier: poll
focal_class.modifiers: public
focal_class.parameters: (long now)
focal_class.return: void
focal_class.signature: void poll(long now)
focal_method.body: public boolean remove(DelayedTask task) {
          boolean wasRemoved = false;
          Iterator<Entry> iterator = tasks.iterator();
          while (iterator.hasNext()) {
              Entry entry = iterator.next();
              if (entry.task.equals(task)) {
                  iterator.remove();
                  wasRemoved = true;
              }
          }
          return wasRemoved;
      }
focal_method.class_method_signature: DelayedTaskQueue.remove(DelayedTask task)
focal_method.full_signature: public boolean remove(DelayedTask task)
focal_method.identifier: remove
focal_method.invocations: iterator hasNext next equals remove
focal_method.modifiers: public
focal_method.parameters: (DelayedTask task)
focal_method.return: boolean
focal_method.signature: boolean remove(DelayedTask task)