airbug/bugcore

View on GitHub

Showing 331 of 357 total issues

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

        validateIterable: function(iterable) {
            if (!TypeUtil.isArray(iterable) && !Class.doesImplement(iterable, IIterable)) {
                throw Throwables.bug('TypeError', {}, 'Expecting an array or an iterable object but got ' + iterable);
            }
        }
Severity: Major
Found in libraries/bugcore/js/src/promise/resolvers/RaceResolver.js and 2 other locations - About 1 hr to fix
libraries/bugcore/js/src/promise/resolvers/AllResolver.js on lines 117..121
libraries/bugcore/js/src/promise/resolvers/PropsResolver.js on lines 167..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 63.

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

    Constructor.newInstanceWithArray = function(args) {
        var constructor = this;
        function F(args) {
            return Function.prototype.apply.call(constructor, this, args);
        }
Severity: Major
Found in libraries/bugcore/js/src/core/Constructor.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/core/Constructor.js on lines 128..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 63.

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

        getAt: function(index) {
            if (index < this.getCount()) {
                return this.itemReflectArray.getAt(index);
            } else {
                throw new Exception("IndexOutOfBounds", {}, "Index out of bounds");
Severity: Major
Found in libraries/bugcore/js/src/data/Stack.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/data/Queue.js on lines 211..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 63.

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

        _constructor: function(eventReceiver, eventTypes) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/event/query/EventQueryBuilder.js and 8 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 56..76
libraries/bugcore/js/src/data/WeightedListNode.js on lines 54..74
libraries/bugcore/js/src/flow/flows/Task.js on lines 54..74
libraries/bugcore/js/src/proxy/ProxyMethod.js on lines 59..79
libraries/bugcore/js/src/proxy/ProxyProperty.js on lines 59..79
libraries/bugcore/js/src/publisher/PublisherMessage.js on lines 54..74
libraries/bugcore/js/src/query/WhereCondition.js on lines 61..81
libraries/bugcore/js/src/stream/Stream.js on lines 78..98

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

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

        _constructor: function(topic, data) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/publisher/PublisherMessage.js and 8 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 56..76
libraries/bugcore/js/src/data/WeightedListNode.js on lines 54..74
libraries/bugcore/js/src/event/query/EventQueryBuilder.js on lines 60..80
libraries/bugcore/js/src/flow/flows/Task.js on lines 54..74
libraries/bugcore/js/src/proxy/ProxyMethod.js on lines 59..79
libraries/bugcore/js/src/proxy/ProxyProperty.js on lines 59..79
libraries/bugcore/js/src/query/WhereCondition.js on lines 61..81
libraries/bugcore/js/src/stream/Stream.js on lines 78..98

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

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

        _constructor: function(taskMethod, taskContext) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/flow/flows/Task.js and 8 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 56..76
libraries/bugcore/js/src/data/WeightedListNode.js on lines 54..74
libraries/bugcore/js/src/event/query/EventQueryBuilder.js on lines 60..80
libraries/bugcore/js/src/proxy/ProxyMethod.js on lines 59..79
libraries/bugcore/js/src/proxy/ProxyProperty.js on lines 59..79
libraries/bugcore/js/src/publisher/PublisherMessage.js on lines 54..74
libraries/bugcore/js/src/query/WhereCondition.js on lines 61..81
libraries/bugcore/js/src/stream/Stream.js on lines 78..98

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

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

        _constructor: function(supplier, operation) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/stream/Stream.js and 8 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 56..76
libraries/bugcore/js/src/data/WeightedListNode.js on lines 54..74
libraries/bugcore/js/src/event/query/EventQueryBuilder.js on lines 60..80
libraries/bugcore/js/src/flow/flows/Task.js on lines 54..74
libraries/bugcore/js/src/proxy/ProxyMethod.js on lines 59..79
libraries/bugcore/js/src/proxy/ProxyProperty.js on lines 59..79
libraries/bugcore/js/src/publisher/PublisherMessage.js on lines 54..74
libraries/bugcore/js/src/query/WhereCondition.js on lines 61..81

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

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

        _constructor: function(method, context) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/proxy/ProxyMethod.js and 8 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 56..76
libraries/bugcore/js/src/data/WeightedListNode.js on lines 54..74
libraries/bugcore/js/src/event/query/EventQueryBuilder.js on lines 60..80
libraries/bugcore/js/src/flow/flows/Task.js on lines 54..74
libraries/bugcore/js/src/proxy/ProxyProperty.js on lines 59..79
libraries/bugcore/js/src/publisher/PublisherMessage.js on lines 54..74
libraries/bugcore/js/src/query/WhereCondition.js on lines 61..81
libraries/bugcore/js/src/stream/Stream.js on lines 78..98

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

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

        getAt: function(index) {
            if (index < this.getCount()) {
                return this.itemReflectArray.getAt(index);
            } else {
                throw new Exception("IndexOutOfBounds", {}, "Index out of bounds");
Severity: Major
Found in libraries/bugcore/js/src/data/Queue.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/data/Stack.js on lines 219..225

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

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

    Constructor.newInstance = function() {
        var constructor = this;
        function F(args) {
            return Function.prototype.apply.call(constructor, this, args);
        }
Severity: Major
Found in libraries/bugcore/js/src/core/Constructor.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/core/Constructor.js on lines 142..149

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

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

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

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

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

Refactorings

Further Reading

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

            if (!this.hashStoreNodeReflectArrayIterator) {
                var hashStoreNode = this.hashStoreNodeReflectObjectIterator.next();
                if (!hashStoreNode) {
                    throw new Exception("EndOfIteration", {}, "End of iteration reached");
                }
libraries/bugcore/js/src/data/iterators/HashTableIterator.js on lines 147..158

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

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

    StringUtil.lpad = function(value, pad, size) {
        var result = value + "";
        while (result.length < size) {
            result = pad + result;
        }
Severity: Major
Found in libraries/bugcore/js/src/util/StringUtil.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/util/StringUtil.js on lines 220..226

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

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

        _constructor: function(instance, propertyName) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/proxy/ProxyProperty.js and 8 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 56..76
libraries/bugcore/js/src/data/WeightedListNode.js on lines 54..74
libraries/bugcore/js/src/event/query/EventQueryBuilder.js on lines 60..80
libraries/bugcore/js/src/flow/flows/Task.js on lines 54..74
libraries/bugcore/js/src/proxy/ProxyMethod.js on lines 59..79
libraries/bugcore/js/src/publisher/PublisherMessage.js on lines 54..74
libraries/bugcore/js/src/query/WhereCondition.js on lines 61..81
libraries/bugcore/js/src/stream/Stream.js on lines 78..98

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

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

        validateObject: function(object) {
            if (!TypeUtil.isObject(object) && !Class.doesImplement(object, IMap)) {
                throw Throwables.bug('TypeError', {}, 'Expecting an object or an IMap but got ' + iterable);
            }
        }
libraries/bugcore/js/src/promise/resolvers/AllResolver.js on lines 117..121
libraries/bugcore/js/src/promise/resolvers/RaceResolver.js on lines 117..121

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

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

        _constructor: function(assertionMethod) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/flow/flows/Assertion.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/promise/Handler.js on lines 57..77

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

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

        _constructor: function(forwardPromise) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/promise/Handler.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/flow/flows/Assertion.js on lines 57..77

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

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

        toString: function() {
            var output = "";
            output += "{\n";
            output += "  " + this.value.toString() + "\n";
            output += "}\n";
Severity: Major
Found in libraries/bugcore/js/src/data/GraphNode.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/data/UnorderedPair.js on lines 154..160

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

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

        propagateEventToPropagators: function(event) {
            var cloneEventPropagatorList = this.getEventPropagatorList().clone();
            cloneEventPropagatorList.forEach(function(eventPropagator) {
                eventPropagator.propagateEvent(event);
            });
Severity: Major
Found in libraries/bugcore/js/src/event/EventReceiver.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/observable/Observable.js on lines 388..393

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

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

            } else if (Class.doesExtend(map, DualMap)) {
                var keys = map.toKeyArray();
                keys.forEach(function(key) {
                    var value = map.getValue(key);
                    this.put(key, value);
Severity: Major
Found in libraries/bugcore/js/src/data/DualMap.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/data/DualMap.js on lines 197..209

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

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

        propagateObservationToPropagators: function(observation) {
            var clonePropagatorList = this.getObservationPropagatorList().clone();
            clonePropagatorList.forEach(function(propagator) {
                propagator.propagateObservation(observation);
            });
Severity: Major
Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/event/EventReceiver.js on lines 339..344

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

Severity
Category
Status
Source
Language