ReactiveX/RxJava

View on GitHub

Showing 411 of 1,068 total issues

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

        public void onNext(T t) {
            if (t == null) {
                error = new NullPointerException();
                done = true;
            } else {
Severity: Minor
Found in src/main/java/rx/internal/operators/OperatorGroupBy.java and 1 other location - About 40 mins to fix
src/main/java/rx/internal/operators/OperatorGroupByEvicting.java on lines 493..501

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

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 (value instanceof Serializable) {
                v = value;
            } else {
                try {
                    v = String.valueOf(value);
Severity: Minor
Found in src/main/java/rx/exceptions/OnErrorThrowable.java and 1 other location - About 40 mins to fix
src/main/java/rx/exceptions/OnErrorThrowable.java on lines 46..54

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

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

            synchronized (guard) {
                if (emitting) {
                    if (queue == null) {
                        queue = new ArrayList<Object>();
                    }
Severity: Minor
Found in src/main/java/rx/internal/operators/OperatorWindowWithTime.java and 1 other location - About 40 mins to fix
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 139..148

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

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 request(long n) {
            if (n < 0) {
                throw new IllegalArgumentException("n >= required but it was " + n);
            }
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 471..480

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

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

        public void onNext(T t) {
            if (t == null) {
                error = new NullPointerException();
                done = true;
            } else {
src/main/java/rx/internal/operators/OperatorGroupBy.java on lines 508..516

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

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

            synchronized (guard) {
                if (emitting) {
                    if (queue == null) {
                        queue = new ArrayList<Object>();
                    }
Severity: Minor
Found in src/main/java/rx/internal/operators/OperatorWindowWithTime.java and 1 other location - About 40 mins to fix
src/main/java/rx/internal/operators/OperatorWindowWithTime.java on lines 306..315

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

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 (value instanceof Serializable) {
            v = value;
        } else {
            try {
                v = String.valueOf(value);
Severity: Minor
Found in src/main/java/rx/exceptions/OnErrorThrowable.java and 1 other location - About 40 mins to fix
src/main/java/rx/exceptions/OnErrorThrowable.java on lines 163..171

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

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 void assertCompleted() {
        int s = completions;
        if (s == 0) {
            assertionError("Not completed!");
        } else
Severity: Minor
Found in src/main/java/rx/observers/TestSubscriber.java and 1 other location - About 35 mins to fix
src/main/java/rx/observers/TestSubscriber.java on lines 511..519

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

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 void assertNotCompleted() {
        int s = completions;
        if (s == 1) {
            assertionError("Completed!");
        } else
Severity: Minor
Found in src/main/java/rx/observers/TestSubscriber.java and 1 other location - About 35 mins to fix
src/main/java/rx/observers/TestSubscriber.java on lines 495..503

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

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

                    if (d && empty) {
                        Throwable ex = error;
                        if (ex != null) {
                            super.onError(ex);
                        } else {
Severity: Major
Found in src/main/java/rx/internal/operators/OnSubscribeCreate.java and 3 other locations - About 35 mins to fix
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 352..360
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 381..389
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 507..515

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

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

abstract class SpscArrayQueueL2Pad<E> extends SpscArrayQueueProducerFields<E> {
    long p20, p21, p22, p23, p24, p25, p26;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpscArrayQueueL2Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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

abstract class MpmcArrayQueueL2Pad<E> extends MpmcArrayQueueProducerField<E> {
    long p20, p21, p22, p23, p24, p25, p26;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public MpmcArrayQueueL2Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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

abstract class SpmcArrayQueueL2Pad<E> extends SpmcArrayQueueProducerField<E> {
    long p20, p21, p22, p23, p24, p25, p26;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpmcArrayQueueL2Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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

abstract class SpmcArrayQueueMidPad<E> extends SpmcArrayQueueConsumerField<E> {
    long p20, p21, p22, p23, p24, p25, p26;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpmcArrayQueueMidPad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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

                    if (d && empty) {
                        Throwable ex = error;
                        if (ex != null) {
                            super.onError(ex);
                        } else {
Severity: Major
Found in src/main/java/rx/internal/operators/OnSubscribeCreate.java and 3 other locations - About 35 mins to fix
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 352..360
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 381..389
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 478..486

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

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

abstract class SpscArrayQueueL1Pad<E> extends SpscArrayQueueColdField<E> {
    long p10, p11, p12, p13, p14, p15, p16;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpscArrayQueueL1Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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

abstract class SpscArrayQueueL3Pad<E> extends SpscArrayQueueConsumerField<E> {
    long p40, p41, p42, p43, p44, p45, p46;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpscArrayQueueL3Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58

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

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

abstract class SpmcArrayQueueL1Pad<E> extends ConcurrentCircularArrayQueue<E> {
    long p10, p11, p12, p13, p14, p15, p16;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpmcArrayQueueL1Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 105..112
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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

                    if (d && empty) {
                        Throwable ex = error;
                        if (ex != null) {
                            super.onError(ex);
                        } else {
Severity: Major
Found in src/main/java/rx/internal/operators/OnSubscribeCreate.java and 3 other locations - About 35 mins to fix
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 381..389
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 478..486
src/main/java/rx/internal/operators/OnSubscribeCreate.java on lines 507..515

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

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

abstract class SpmcArrayQueueL3Pad<E> extends SpmcArrayQueueProducerIndexCacheField<E> {
    long p40, p41, p42, p43, p44, p45, p46;
    long p30, p31, p32, p33, p34, p35, p36, p37;

    public SpmcArrayQueueL3Pad(int capacity) {
Severity: Major
Found in src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java and 8 other locations - About 35 mins to fix
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 23..30
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 50..57
src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java on lines 77..84
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 31..38
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 51..58
src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java on lines 69..76

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

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