ReactiveX/RxJava

View on GitHub
src/main/java/rx/internal/operators/OperatorReplay.java

Summary

Maintainability
F
1 wk
Test Coverage

File OperatorReplay.java has 874 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Copyright 2014 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
Severity: Major
Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 2 days to fix

    Method replay has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
    Open

            @Override
            public final void replay(InnerProducer<T> output) {
                synchronized (output) {
                    if (output.emitting) {
                        output.missed = true;
    Severity: Minor
    Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method manageRequests has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

            void manageRequests(InnerProducer<T> inner) {
                // if the upstream has completed, no more requesting is possible
                if (isUnsubscribed()) {
                    return;
                }
    Severity: Minor
    Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method replay has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

            @Override
            public void replay(InnerProducer<T> output) {
                synchronized (output) {
                    if (output.emitting) {
                        output.missed = true;
    Severity: Minor
    Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method manageRequests has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            void manageRequests(InnerProducer<T> inner) {
                // if the upstream has completed, no more requesting is possible
                if (isUnsubscribed()) {
                    return;
                }
    Severity: Major
    Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 2 hrs to fix

      Method replay has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              @Override
              public final void replay(InnerProducer<T> output) {
                  synchronized (output) {
                      if (output.emitting) {
                          output.missed = true;
      Severity: Major
      Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 2 hrs to fix

        OperatorReplay has 21 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public final class OperatorReplay<T> extends ConnectableObservable<T> implements Subscription {
            /** The source observable. */
            final Observable<? extends T> source;
            /** Holds the current subscriber that is, will be or just was subscribed to the source observable. */
            final AtomicReference<ReplaySubscriber<T>> current;
        Severity: Minor
        Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 2 hrs to fix

          Method replay has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  @Override
                  public void replay(InnerProducer<T> output) {
                      synchronized (output) {
                          if (output.emitting) {
                              output.missed = true;
          Severity: Major
          Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 2 hrs to fix

            Method truncate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

                    @Override
                    void truncate() {
                        long timeLimit = scheduler.now() - maxAgeInMillis;
            
                        Node prev = get();
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method makeRequest has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

                    void makeRequest(long maxTotalRequests, long previousTotalRequests) {
                        long ur = maxUpstreamRequested;
                        Producer p = producer;
            
                        long diff = maxTotalRequests - previousTotalRequests;
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method request has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
            Open

                    @Override
                    public void request(long n) {
                        // ignore negative requests
                        if (n < 0) {
                            return;
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Method truncate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    @Override
                    void truncate() {
                        long timeLimit = scheduler.now() - maxAgeInMillis;
            
                        Node prev = get();
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

              Method truncateFinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                      @Override
                      void truncateFinal() {
                          long timeLimit = scheduler.now() - maxAgeInMillis;
              
                          Node prev = get();
              Severity: Minor
              Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method create has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  static <T> ConnectableObservable<T> create(Observable<? extends T> source,
                          final Func0<? extends ReplayBuffer<T>> bufferFactory) {
                      // the current connection to source needs to be shared between the operator and its onSubscribe call
                      final AtomicReference<ReplaySubscriber<T>> curr = new AtomicReference<ReplaySubscriber<T>>();
                      OnSubscribe<T> onSubscribe = new OnSubscribe<T>() {
              Severity: Minor
              Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method observeOn has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static <T> ConnectableObservable<T> observeOn(final ConnectableObservable<T> co, final Scheduler scheduler) {
                      final Observable<T> observable = co.observeOn(scheduler);
                      OnSubscribe<T> onSubscribe = new OnSubscribe<T>() {
                          @Override
                          public void call(final Subscriber<? super T> child) {
              Severity: Minor
              Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 1 hr to fix

                Method connect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    @Override
                    public void connect(Action1<? super Subscription> connection) {
                        boolean doConnect;
                        ReplaySubscriber<T> ps;
                        // we loop because concurrent connect/disconnect and termination may change the state
                Severity: Minor
                Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 55 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method produced has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                        public long produced(long n) {
                            // we don't allow producing zero or less: it would be a bug in the operator
                            if (n <= 0) {
                                throw new IllegalArgumentException("Cant produce zero or less");
                            }
                Severity: Minor
                Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 45 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method collect has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                        /* test */ final  void collect(Collection<? super T> output) {
                            Node n = getInitialHead();
                            for (;;) {
                                Node next = n.get();
                                if (next != null) {
                Severity: Minor
                Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 45 mins to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method create has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static <T> ConnectableObservable<T> create(Observable<? extends T> source,
                            long maxAge, TimeUnit unit, final Scheduler scheduler, final int bufferSize) {
                Severity: Minor
                Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 35 mins to fix

                  Method replay has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                          @SuppressWarnings("unchecked")
                          void replay() {
                              InnerProducer<T>[] pc = producersCache;
                              if (producersCacheVersion != producersVersion) {
                                  synchronized (producers) {
                  Severity: Minor
                  Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method getInitialHead has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                          @Override
                          Node getInitialHead() {
                              long timeLimit = scheduler.now() - maxAgeInMillis;
                              Node prev = get();
                  
                  
                  Severity: Minor
                  Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 35 mins to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Avoid too many return statements within this method.
                  Open

                                          return;
                  Severity: Major
                  Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                                return;
                    Severity: Major
                    Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                              return;
                      Severity: Major
                      Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                                return;
                        Severity: Major
                        Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                  return;
                          Severity: Major
                          Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return;
                            Severity: Major
                            Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                              return;
                              Severity: Major
                              Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 30 mins to fix

                                Method call has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                            @Override
                                            public void call(Subscriber<? super T> child) {
                                                // concurrent connection/disconnection may change the state,
                                                // we loop to be atomic while the child subscribes
                                                for (;;) {
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 25 mins to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                    } else {
                                                        Timestamped<?> v = (Timestamped<?>)next.value;
                                                        if (v.getTimestampMillis() <= timeLimit) {
                                                            e++;
                                                            size--;
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 50 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 1313..1323

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 60.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                if (next != null && size > 1) {
                                                    Timestamped<?> v = (Timestamped<?>)next.value;
                                                    if (v.getTimestampMillis() <= timeLimit) {
                                                        e++;
                                                        size--;
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 50 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 1285..1295

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 60.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                    if (r == null) {
                                                        // create a new subscriber to source
                                                        ReplaySubscriber<T> u = new ReplaySubscriber<T>(bufferFactory.call());
                                                        // perform extra initialization to avoid 'this' to escape during construction
                                                        u.init();
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 35 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 277..289

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 44.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                            if (ps == null || ps.isUnsubscribed()) {
                                                // create a new subscriber-to-source
                                                ReplaySubscriber<T> u = new ReplaySubscriber<T>(bufferFactory.call());
                                                // initialize out the constructor to avoid 'this' to escape
                                                u.init();
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 35 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 211..224

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 44.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                            @Override
                                            public void call(final Subscriber<? super T> child) {
                                                // apply observeOn and prevent calling onStart() again
                                                observable.unsafeSubscribe(new Subscriber<T>(child) {
                                                    @Override
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 35 mins to fix
                                src/main/java/rx/internal/operators/OperatorMulticast.java on lines 115..130

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 44.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    static final class Node extends AtomicReference<Node> {
                                        /** */
                                        private static final long serialVersionUID = 245354315435971818L;
                                
                                        /** The contained value. */
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 35 mins to fix
                                src/main/java/rx/subjects/ReplaySubject.java on lines 1143..1155

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 43.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                        @Override
                                        public final void error(Throwable e) {
                                            Object o = enterTransform(NotificationLite.error(e));
                                            Node n = new Node(o, ++index);
                                            addLast(n);
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 30 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 1029..1035

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 42.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                } else {
                                                    // collect upstream request amounts until there is a producer for them
                                                    long u = ur + diff;
                                                    if (u < 0) {
                                                        u = Long.MAX_VALUE;
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 30 mins to fix
                                src/main/java/rx/internal/producers/ProducerObserverArbiter.java on lines 259..265

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 42.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                        @Override
                                        public final void next(T value) {
                                            Object o = enterTransform(NotificationLite.next(value));
                                            Node n = new Node(o, ++index);
                                            addLast(n);
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 30 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 1037..1043

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 42.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                if (e != 0L) {
                                                    output.index = destinationIndex;
                                                    if (r != Long.MAX_VALUE) {
                                                        output.produced(e);
                                                    }
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 30 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 1119..1124

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 40.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 3 locations. Consider refactoring.
                                Open

                                                            if (!NotificationLite.isError(o) && !NotificationLite.isCompleted(o)) {
                                                                child.onError(OnErrorThrowable.addValueAsLastCause(err, NotificationLite.getValue(o)));
                                                            }
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 2 other locations - About 30 mins to fix
                                src/main/java/rx/internal/operators/CachedObservable.java on lines 412..414
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 909..911

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 40.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 3 locations. Consider refactoring.
                                Open

                                                        if (!NotificationLite.isError(o) && !NotificationLite.isCompleted(o)) {
                                                            child.onError(OnErrorThrowable.addValueAsLastCause(err, NotificationLite.getValue(o)));
                                                        }
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 2 other locations - About 30 mins to fix
                                src/main/java/rx/internal/operators/CachedObservable.java on lines 412..414
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 1104..1106

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 40.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                if (e != 0L) {
                                                    output.index = node;
                                                    if (r != Long.MAX_VALUE) {
                                                        output.produced(e);
                                                    }
                                Severity: Minor
                                Found in src/main/java/rx/internal/operators/OperatorReplay.java and 1 other location - About 30 mins to fix
                                src/main/java/rx/internal/operators/OperatorReplay.java on lines 920..925

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 40.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                There are no issues that match your filters.

                                Category
                                Status