ReactiveX/RxJava

View on GitHub

Showing 411 of 1,068 total issues

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

                return f.call((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4], (T5) args[5], (T6) args[6]);
Severity: Minor
Found in src/main/java/rx/functions/Functions.java and 1 other location - About 50 mins to fix
src/main/java/rx/Single.java on lines 1281..1281

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

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 (!errors.isEmpty()) {
            int size = errors.size();
            b.append(" (+")
            .append(size)
            .append(" error");
Severity: Minor
Found in src/main/java/rx/observers/TestSubscriber.java and 1 other location - About 50 mins to fix
src/main/java/rx/observers/TestObserver.java on lines 187..196

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

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

                return zipFunction.call((T1) args[0], (T2) args[1], (T3) args[2], (T4) args[3], (T5) args[4], (T6) args[5], (T7) args[6]);
Severity: Minor
Found in src/main/java/rx/Single.java and 1 other location - About 50 mins to fix
src/main/java/rx/functions/Functions.java on lines 228..228

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

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

    @Override
    public void unsubscribe() {
        if (!unsubscribed) {
            List<Subscription> list;
            synchronized (this) {
Severity: Minor
Found in src/main/java/rx/internal/util/SubscriptionList.java and 1 other location - About 50 mins to fix
src/main/java/rx/subscriptions/CompositeSubscription.java on lines 162..177

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

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

    @Override
    public void unsubscribe() {
        if (!unsubscribed) {
            Collection<Subscription> unsubscribe;
            synchronized (this) {
Severity: Minor
Found in src/main/java/rx/subscriptions/CompositeSubscription.java and 1 other location - About 50 mins to fix
src/main/java/rx/internal/util/SubscriptionList.java on lines 112..127

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

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

        @SuppressWarnings("unchecked")
        Subscription subscription = ((Observable<T>)observable).subscribe(new Subscriber<T>() {
            @Override
            public void onCompleted() {
                latch.countDown();
Severity: Minor
Found in src/main/java/rx/observables/BlockingObservable.java and 1 other location - About 50 mins to fix
src/main/java/rx/observables/BlockingObservable.java on lines 110..135

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

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

        @SuppressWarnings("unchecked")
        Subscription subscription = ((Observable<T>)o).subscribe(new Subscriber<T>() {
            @Override
            public void onCompleted() {
                latch.countDown();
Severity: Minor
Found in src/main/java/rx/observables/BlockingObservable.java and 1 other location - About 50 mins to fix
src/main/java/rx/observables/BlockingObservable.java on lines 442..459

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

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

    public CompletableOnSubscribeTimeout(Completable source, long timeout,
            TimeUnit unit, Scheduler scheduler, Completable other) {
        this.source = source;
        this.timeout = timeout;
        this.unit = unit;
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

        public SourceSubscriber(Subscriber<? super T> child,
                final Func2<Integer, Throwable, Boolean> predicate,
                Scheduler.Worker inner,
                SerialSubscription serialSubscription,
                ProducerArbiter pa) {
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OnSubscribeCombineLatest(Observable<? extends T>[] sources,
            Iterable<? extends Observable<? extends T>> sourcesIterable,
            FuncN<? extends R> combiner, int bufferSize,
            boolean delayError) {
        this.sources = sources;
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    private OnSubscribeRedo(Observable<T> source, Func1<? super Observable<? extends Notification<?>>, ? extends Observable<?>> f, boolean stopOnComplete, boolean stopOnError,
            Scheduler scheduler) {
        this.source = source;
        this.controlHandlerFunction = f;
        this.stopOnComplete = stopOnComplete;
Severity: Major
Found in src/main/java/rx/internal/operators/OnSubscribeRedo.java and 12 other locations - About 50 mins to fix
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OperatorWindowWithTime(long timespan, long timeshift, TimeUnit unit, int size, Scheduler scheduler) {
        this.timespan = timespan;
        this.timeshift = timeshift;
        this.unit = unit;
        this.size = size;
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OnSubscribeGroupJoin(
            Observable<T1> left,
            Observable<T2> right,
            Func1<? super T1, ? extends Observable<D1>> leftDuration,
            Func1<? super T2, ? extends Observable<D2>> rightDuration,
Severity: Major
Found in src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java and 12 other locations - About 50 mins to fix
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OperatorBufferWithTime(long timespan, long timeshift, TimeUnit unit, int count, Scheduler scheduler) {
        this.timespan = timespan;
        this.timeshift = timeshift;
        this.unit = unit;
        this.count = count;
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OnSubscribeJoin(
            Observable<TLeft> left,
            Observable<TRight> right,
            Func1<TLeft, Observable<TLeftDuration>> leftDurationSelector,
            Func1<TRight, Observable<TRightDuration>> rightDurationSelector,
Severity: Major
Found in src/main/java/rx/internal/operators/OnSubscribeJoin.java and 12 other locations - About 50 mins to fix
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public SingleTimeout(Single.OnSubscribe<T> source, long timeout, TimeUnit unit, Scheduler scheduler,
            Single.OnSubscribe<? extends T> other) {
        this.source = source;
        this.timeout = timeout;
        this.unit = unit;
Severity: Major
Found in src/main/java/rx/internal/operators/SingleTimeout.java and 12 other locations - About 50 mins to fix
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

        ReplaySupplierTime(Observable<T> source, int bufferSize, long time, TimeUnit unit,
                           Scheduler scheduler) {
            this.time = time;
            this.unit = unit;
            this.scheduler = scheduler;
Severity: Major
Found in src/main/java/rx/internal/util/InternalObservableUtils.java and 12 other locations - About 50 mins to fix
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45

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

    public OperatorGroupBy(Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends V> valueSelector, int bufferSize, boolean delayError, Func1<Action1<K>, Map<K, Object>> mapFactory) {
        this.keySelector = keySelector;
        this.valueSelector = valueSelector;
        this.bufferSize = bufferSize;
        this.delayError = delayError;
Severity: Major
Found in src/main/java/rx/internal/operators/OperatorGroupBy.java and 12 other locations - About 50 mins to fix
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OperatorGroupByEvicting(Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends V> valueSelector, int bufferSize, boolean delayError, Func1<Action1<Object>, Map<K, Object>> mapFactory) {
        this.keySelector = keySelector;
        this.valueSelector = valueSelector;
        this.bufferSize = bufferSize;
        this.delayError = delayError;
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OnSubscribeTimeoutTimedWithFallback.java on lines 48..56
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

    public OnSubscribeTimeoutTimedWithFallback(Observable<T> source, long timeout,
            TimeUnit unit, Scheduler scheduler,
            Observable<? extends T> fallback) {
        this.source = source;
        this.timeout = timeout;
src/main/java/rx/internal/operators/CompletableOnSubscribeTimeout.java on lines 36..43
src/main/java/rx/internal/operators/OnSubscribeCombineLatest.java on lines 40..49
src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java on lines 47..58
src/main/java/rx/internal/operators/OnSubscribeJoin.java on lines 44..55
src/main/java/rx/internal/operators/OnSubscribeRedo.java on lines 177..184
src/main/java/rx/internal/operators/OperatorBufferWithTime.java on lines 62..68
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 69..75
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 63..69
src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java on lines 54..64
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 53..59
src/main/java/rx/internal/operators/SingleTimeout.java on lines 38..45
src/main/java/rx/internal/util/InternalObservableUtils.java on lines 343..350

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

Severity
Category
Status
Source
Language