test_class.file: rxjava/src/test/java/io/reactivex/internal/subscriptions/SubscriptionArbiterTest.java
test_class.identifier: SubscriptionArbiterTest
test_case.body: @Test
      public void invalidDeferredRequest() {
          SubscriptionArbiter sa = new SubscriptionArbiter();
  
          List<Throwable> errors = TestHelper.trackPluginErrors();
          try {
              sa.request(-99);
  
              TestHelper.assertError(errors, 0, IllegalArgumentException.class, "n > 0 required but it was -99");
          } finally {
              RxJavaPlugins.reset();
          }
      }
test_case.class_method_signature: SubscriptionArbiterTest.invalidDeferredRequest()
test_case.full_signature: @Test public void invalidDeferredRequest()
test_case.identifier: invalidDeferredRequest
test_case.invocations: trackPluginErrors request assertError reset
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void invalidDeferredRequest()
focal_class.declarator: serialVersionUID = -2189523197179400958L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -2189523197179400958L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: actual
focal_class.original_string: Subscription actual;
focal_class.type: Subscription
focal_class.var_name: actual
focal_class.declarator: requested
focal_class.original_string: long requested;
focal_class.type: long
focal_class.var_name: requested
focal_class.declarator: missedSubscription
focal_class.modifier: final
focal_class.original_string: final AtomicReference<Subscription> missedSubscription;
focal_class.type: AtomicReference<Subscription>
focal_class.var_name: missedSubscription
focal_class.declarator: missedRequested
focal_class.modifier: final
focal_class.original_string: final AtomicLong missedRequested;
focal_class.type: AtomicLong
focal_class.var_name: missedRequested
focal_class.declarator: missedProduced
focal_class.modifier: final
focal_class.original_string: final AtomicLong missedProduced;
focal_class.type: AtomicLong
focal_class.var_name: missedProduced
focal_class.declarator: cancelled
focal_class.modifier: volatile
focal_class.original_string: volatile boolean cancelled;
focal_class.type: boolean
focal_class.var_name: cancelled
focal_class.declarator: unbounded
focal_class.modifier: protected
focal_class.original_string: protected boolean unbounded;
focal_class.type: boolean
focal_class.var_name: unbounded
focal_class.file: rxjava/src/main/java/io/reactivex/internal/subscriptions/SubscriptionArbiter.java
focal_class.identifier: SubscriptionArbiter
focal_class.interfaces: implements Subscription
focal_class.class_method_signature: SubscriptionArbiter.SubscriptionArbiter()
focal_class.full_signature: public  SubscriptionArbiter()
focal_class.identifier: SubscriptionArbiter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SubscriptionArbiter()
focal_class.class_method_signature: SubscriptionArbiter.setSubscription(Subscription s)
focal_class.full_signature: public final void setSubscription(Subscription s)
focal_class.identifier: setSubscription
focal_class.modifiers: public final
focal_class.parameters: (Subscription s)
focal_class.return: void
focal_class.signature: void setSubscription(Subscription s)
focal_class.class_method_signature: SubscriptionArbiter.request(long n)
focal_class.full_signature: @Override public final void request(long n)
focal_class.identifier: request
focal_class.modifiers: @Override public final
focal_class.parameters: (long n)
focal_class.return: void
focal_class.signature: void request(long n)
focal_class.class_method_signature: SubscriptionArbiter.produced(long n)
focal_class.full_signature: public final void produced(long n)
focal_class.identifier: produced
focal_class.modifiers: public final
focal_class.parameters: (long n)
focal_class.return: void
focal_class.signature: void produced(long n)
focal_class.class_method_signature: SubscriptionArbiter.cancel()
focal_class.full_signature: @Override public void cancel()
focal_class.identifier: cancel
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cancel()
focal_class.class_method_signature: SubscriptionArbiter.drain()
focal_class.full_signature: final void drain()
focal_class.identifier: drain
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void drain()
focal_class.class_method_signature: SubscriptionArbiter.drainLoop()
focal_class.full_signature: final void drainLoop()
focal_class.identifier: drainLoop
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void drainLoop()
focal_class.class_method_signature: SubscriptionArbiter.isUnbounded()
focal_class.full_signature: public final boolean isUnbounded()
focal_class.identifier: isUnbounded
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isUnbounded()
focal_class.class_method_signature: SubscriptionArbiter.isCancelled()
focal_class.full_signature: public final boolean isCancelled()
focal_class.identifier: isCancelled
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCancelled()
focal_class.superclass: extends AtomicInteger
focal_method.body: @Override
      public final void request(long n) {
          if (SubscriptionHelper.validate(n)) {
              if (unbounded) {
                  return;
              }
              if (get() == 0 && compareAndSet(0, 1)) {
                  long r = requested;
  
                  if (r != Long.MAX_VALUE) {
                      r = BackpressureHelper.addCap(r, n);
                      requested = r;
                      if (r == Long.MAX_VALUE) {
                          unbounded = true;
                      }
                  }
                  Subscription a = actual;
  
                  if (decrementAndGet() != 0) {
                      drainLoop();
                  }
  
                  if (a != null) {
                      a.request(n);
                  }
  
                  return;
              }
  
              BackpressureHelper.add(missedRequested, n);
  
              drain();
          }
      }
focal_method.class_method_signature: SubscriptionArbiter.request(long n)
focal_method.full_signature: @Override public final void request(long n)
focal_method.identifier: request
focal_method.invocations: validate get compareAndSet addCap decrementAndGet drainLoop request add drain
focal_method.modifiers: @Override public final
focal_method.parameters: (long n)
focal_method.return: void
focal_method.signature: void request(long n)