ReactiveX/RxJava

View on GitHub
src/main/java/rx/Completable.java

Summary

Maintainability
F
1 wk
Test Coverage

Completable has 191 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Completable {
    /** The actual subscription action. */
    private final OnSubscribe onSubscribe;

    /**
Severity: Major
Found in src/main/java/rx/Completable.java - About 3 days to fix

    File Completable.java has 1377 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/Completable.java - About 3 days to fix

      Method using has 104 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static <R> Completable using(final Func0<R> resourceFunc0,
                  final Func1<? super R, ? extends Completable> completableFunc1,
                  final Action1<? super R> disposer,
                  final boolean eager) {
              requireNonNull(resourceFunc0);
      Severity: Major
      Found in src/main/java/rx/Completable.java - About 4 hrs to fix

        Method amb has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static Completable amb(final Iterable<? extends Completable> sources) {
                requireNonNull(sources);
        
                return create(new OnSubscribe() {
                    @Override
        Severity: Major
        Found in src/main/java/rx/Completable.java - About 3 hrs to fix

          Method doOnLifecycle has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected final Completable doOnLifecycle(
                      final Action1<? super Subscription> onSubscribe,
                      final Action1<? super Throwable> onError,
                      final Action0 onComplete,
                      final Action0 onAfterTerminate,
          Severity: Major
          Found in src/main/java/rx/Completable.java - About 2 hrs to fix

            Method amb has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static Completable amb(final Completable... sources) {
                    requireNonNull(sources);
                    if (sources.length == 0) {
                        return complete();
                    }
            Severity: Major
            Found in src/main/java/rx/Completable.java - About 2 hrs to fix

              Method onErrorResumeNext has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public final Completable onErrorResumeNext(final Func1<? super Throwable, ? extends Completable> errorMapper) {
                      requireNonNull(errorMapper);
                      return create(new OnSubscribe() {
                          @Override
                          public void call(final rx.CompletableSubscriber s) {
              Severity: Minor
              Found in src/main/java/rx/Completable.java - About 1 hr to fix

                Method delay has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public final Completable delay(final long delay, final TimeUnit unit, final Scheduler scheduler, final boolean delayError) {
                        requireNonNull(unit);
                        requireNonNull(scheduler);
                        return create(new OnSubscribe() {
                            @Override
                Severity: Minor
                Found in src/main/java/rx/Completable.java - About 1 hr to fix

                  Method subscribe has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public final Subscription subscribe(final Action0 onComplete, final Action1<? super Throwable> onError) {
                          requireNonNull(onComplete);
                          requireNonNull(onError);
                  
                          final MultipleAssignmentSubscription mad = new MultipleAssignmentSubscription();
                  Severity: Minor
                  Found in src/main/java/rx/Completable.java - About 1 hr to fix

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

                        public final Completable observeOn(final Scheduler scheduler) {
                            requireNonNull(scheduler);
                            return create(new OnSubscribe() {
                                @Override
                                public void call(final rx.CompletableSubscriber s) {
                    Severity: Minor
                    Found in src/main/java/rx/Completable.java - About 1 hr to fix

                      Method await has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public final boolean await(long timeout, TimeUnit unit) {
                              requireNonNull(unit);
                      
                              final CountDownLatch cdl = new CountDownLatch(1);
                              final Throwable[] err = new Throwable[1];
                      Severity: Minor
                      Found in src/main/java/rx/Completable.java - About 1 hr to fix

                        Method unsubscribeOn has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public final Completable unsubscribeOn(final Scheduler scheduler) {
                                requireNonNull(scheduler);
                                return create(new OnSubscribe() {
                                    @Override
                                    public void call(final rx.CompletableSubscriber s) {
                        Severity: Minor
                        Found in src/main/java/rx/Completable.java - About 1 hr to fix

                          Method onErrorComplete has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public final Completable onErrorComplete(final Func1<? super Throwable, Boolean> predicate) {
                                  requireNonNull(predicate);
                          
                                  return create(new OnSubscribe() {
                                      @Override
                          Severity: Minor
                          Found in src/main/java/rx/Completable.java - About 1 hr to fix

                            Method get has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public final Throwable get(long timeout, TimeUnit unit) {
                                    requireNonNull(unit);
                            
                                    final CountDownLatch cdl = new CountDownLatch(1);
                                    final Throwable[] err = new Throwable[1];
                            Severity: Minor
                            Found in src/main/java/rx/Completable.java - About 1 hr to fix

                              Method toSingle has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public final <T> Single<T> toSingle(final Func0<? extends T> completionValueFunc0) {
                                      requireNonNull(completionValueFunc0);
                                      return Single.create(new rx.Single.OnSubscribe<T>() {
                                          @Override
                                          public void call(final SingleSubscriber<? super T> s) {
                              Severity: Minor
                              Found in src/main/java/rx/Completable.java - About 1 hr to fix

                                Method subscribe has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public final Subscription subscribe(final Action0 onComplete) {
                                        requireNonNull(onComplete);
                                
                                        final MultipleAssignmentSubscription mad = new MultipleAssignmentSubscription();
                                        unsafeSubscribe(new rx.CompletableSubscriber() {
                                Severity: Minor
                                Found in src/main/java/rx/Completable.java - About 1 hr to fix

                                  Method await has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public final void await() {
                                          final CountDownLatch cdl = new CountDownLatch(1);
                                          final Throwable[] err = new Throwable[1];
                                  
                                          unsafeSubscribe(new rx.CompletableSubscriber() {
                                  Severity: Minor
                                  Found in src/main/java/rx/Completable.java - About 1 hr to fix

                                    Method unsafeSubscribe has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private <T> void unsafeSubscribe(final Subscriber<T> s, boolean callOnStart) {
                                            requireNonNull(s);
                                            try {
                                                if (callOnStart) {
                                                    s.onStart();
                                    Severity: Minor
                                    Found in src/main/java/rx/Completable.java - About 1 hr to fix

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

                                          public final boolean await(long timeout, TimeUnit unit) {
                                              requireNonNull(unit);
                                      
                                              final CountDownLatch cdl = new CountDownLatch(1);
                                              final Throwable[] err = new Throwable[1];
                                      Severity: Minor
                                      Found in src/main/java/rx/Completable.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 doOnLifecycle has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                                  final Action1<? super Subscription> onSubscribe,
                                                  final Action1<? super Throwable> onError,
                                                  final Action0 onComplete,
                                                  final Action0 onAfterTerminate,
                                                  final Action0 onUnsubscribe) {
                                      Severity: Minor
                                      Found in src/main/java/rx/Completable.java - About 35 mins to fix

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

                                            public final void await() {
                                                final CountDownLatch cdl = new CountDownLatch(1);
                                                final Throwable[] err = new Throwable[1];
                                        
                                                unsafeSubscribe(new rx.CompletableSubscriber() {
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.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

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

                                                        rx.CompletableSubscriber inner = new rx.CompletableSubscriber() {
                                                            @Override
                                                            public void onCompleted() {
                                                                if (once.compareAndSet(false, true)) {
                                                                    set.unsubscribe();
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 1 hr to fix
                                        src/main/java/rx/Completable.java on lines 108..132

                                        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 87.

                                        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

                                                        rx.CompletableSubscriber inner = new rx.CompletableSubscriber() {
                                                            @Override
                                                            public void onCompleted() {
                                                                if (once.compareAndSet(false, true)) {
                                                                    set.unsubscribe();
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 1 hr to fix
                                        src/main/java/rx/Completable.java on lines 193..217

                                        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 87.

                                        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

                                            public static Completable fromCallable(final Callable<?> callable) {
                                                requireNonNull(callable);
                                                return create(new OnSubscribe() {
                                                    @Override
                                                    public void call(rx.CompletableSubscriber s) {
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 1 hr to fix
                                        src/main/java/rx/Completable.java on lines 459..479

                                        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 86.

                                        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

                                            public static Completable fromAction(final Action0 action) {
                                                requireNonNull(action);
                                                return create(new OnSubscribe() {
                                                    @Override
                                                    public void call(rx.CompletableSubscriber s) {
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 1 hr to fix
                                        src/main/java/rx/Completable.java on lines 487..507

                                        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 86.

                                        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 (c == null) {
                                                                NullPointerException npe = new NullPointerException("One of the sources is null");
                                                                if (once.compareAndSet(false, true)) {
                                                                    set.unsubscribe();
                                                                    s.onError(npe);
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 50 mins to fix
                                        src/main/java/rx/Completable.java on lines 265..274

                                        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 58.

                                        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 (c == null) {
                                                                NullPointerException npe = new NullPointerException("One of the sources is null");
                                                                if (once.compareAndSet(false, true)) {
                                                                    set.unsubscribe();
                                                                    s.onError(npe);
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 50 mins to fix
                                        src/main/java/rx/Completable.java on lines 138..147

                                        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 58.

                                        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

                                                            try {
                                                                c = it.next();
                                                            } catch (Throwable e) {
                                                                if (once.compareAndSet(false, true)) {
                                                                    set.unsubscribe();
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 45 mins to fix
                                        src/main/java/rx/Completable.java on lines 226..236

                                        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 56.

                                        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

                                                            try {
                                                                b = it.hasNext();
                                                            } catch (Throwable e) {
                                                                if (once.compareAndSet(false, true)) {
                                                                    set.unsubscribe();
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 45 mins to fix
                                        src/main/java/rx/Completable.java on lines 253..263

                                        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 56.

                                        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

                                            public static Completable concat(Completable... sources) {
                                                requireNonNull(sources);
                                                if (sources.length == 0) {
                                                    return complete();
                                                } else
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 45 mins to fix
                                        src/main/java/rx/Completable.java on lines 631..640

                                        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 54.

                                        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

                                                                s.onSubscribe(Subscriptions.create(new Action0() {
                                                                    @Override
                                                                    public void call() {
                                                                        final Scheduler.Worker w = scheduler.createWorker();
                                                                        w.schedule(new Action0() {
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 45 mins to fix
                                        src/main/java/rx/Single.java on lines 2841..2856

                                        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 54.

                                        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

                                            public static Completable merge(Completable... sources) {
                                                requireNonNull(sources);
                                                if (sources.length == 0) {
                                                    return complete();
                                                } else
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 45 mins to fix
                                        src/main/java/rx/Completable.java on lines 305..314

                                        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 54.

                                        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 4 locations. Consider refactoring.
                                        Open

                                                unsafeSubscribe(new rx.CompletableSubscriber() {
                                        
                                                    @Override
                                                    public void onCompleted() {
                                                        cdl.countDown();
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 3 other locations - About 30 mins to fix
                                        src/main/java/rx/Completable.java on lines 1085..1103
                                        src/main/java/rx/Completable.java on lines 1479..1497
                                        src/main/java/rx/Completable.java on lines 1525..1543

                                        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 41.

                                        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 4 locations. Consider refactoring.
                                        Open

                                                unsafeSubscribe(new rx.CompletableSubscriber() {
                                        
                                                    @Override
                                                    public void onCompleted() {
                                                        cdl.countDown();
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 3 other locations - About 30 mins to fix
                                        src/main/java/rx/Completable.java on lines 1034..1052
                                        src/main/java/rx/Completable.java on lines 1085..1103
                                        src/main/java/rx/Completable.java on lines 1479..1497

                                        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 41.

                                        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 4 locations. Consider refactoring.
                                        Open

                                                unsafeSubscribe(new rx.CompletableSubscriber() {
                                        
                                                    @Override
                                                    public void onCompleted() {
                                                        cdl.countDown();
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 3 other locations - About 30 mins to fix
                                        src/main/java/rx/Completable.java on lines 1034..1052
                                        src/main/java/rx/Completable.java on lines 1085..1103
                                        src/main/java/rx/Completable.java on lines 1525..1543

                                        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 41.

                                        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 4 locations. Consider refactoring.
                                        Open

                                                unsafeSubscribe(new rx.CompletableSubscriber() {
                                        
                                                    @Override
                                                    public void onCompleted() {
                                                        cdl.countDown();
                                        Severity: Major
                                        Found in src/main/java/rx/Completable.java and 3 other locations - About 30 mins to fix
                                        src/main/java/rx/Completable.java on lines 1034..1052
                                        src/main/java/rx/Completable.java on lines 1479..1497
                                        src/main/java/rx/Completable.java on lines 1525..1543

                                        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 41.

                                        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

                                            public static Completable complete() {
                                                OnSubscribe cos = RxJavaHooks.onCreate(COMPLETE.onSubscribe);
                                                if (cos == COMPLETE.onSubscribe) {
                                                    return COMPLETE;
                                                }
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 30 mins to fix
                                        src/main/java/rx/Completable.java on lines 755..761

                                        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 41.

                                        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

                                            public static Completable never() {
                                                OnSubscribe cos = RxJavaHooks.onCreate(NEVER.onSubscribe);
                                                if (cos == NEVER.onSubscribe) {
                                                    return NEVER;
                                                }
                                        Severity: Minor
                                        Found in src/main/java/rx/Completable.java and 1 other location - About 30 mins to fix
                                        src/main/java/rx/Completable.java on lines 291..297

                                        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 41.

                                        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