airbug/bugcore

View on GitHub

Showing 357 of 357 total issues

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

        setProperties: function(propertiesObject) {
            var _this = this;
            ObjectUtil.forIn(propertiesObject, function(propertyName, propertyValue) {
                _this.setProperty(propertyName, propertyValue);
            });
Severity: Minor
Found in libraries/bugcore/js/src/observable/data/ObservableObject.js and 1 other location - About 50 mins to fix
libraries/bugcore/js/src/util/Properties.js on lines 145..150

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

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 (TypeUtil.isArray(values) || ((Class.doesImplement(values, IArrayable) || Class.doesImplement(values, IIterable)) && !Class.doesImplement(values, ICollection))) {
                collection = new Collection(values);
            } else {
                collection = /** @type {ICollection} */(values);
            }
Severity: Minor
Found in libraries/bugcore/js/src/data/Collection.js and 1 other location - About 50 mins to fix
libraries/bugcore/js/src/data/Collection.js on lines 221..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 51.

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

Avoid deeply nested control flow statements.
Open

                            if (childTrace.getName() === name) {
                                nextTrace = childTrace;
                                break;
                            }
Severity: Major
Found in libraries/bugcore/js/src/trace/Tracer.js - About 45 mins to fix

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

            attachObserversToTypes: function(changeTypes, observerSet) {
                var _this = this;
                observerSet.forEach(function(observer) {
                    _this.attachObserverToTypes(changeTypes, observer);
                });
    Severity: Minor
    Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 45 mins to fix
    libraries/bugcore/js/src/observable/Observable.js on lines 280..285

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

    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

            detachObserversFromTypes: function(changeTypes, observerSet) {
                var _this = this;
                observerSet.forEach(function(observer) {
                    _this.detachObserverFromTypes(changeTypes, observer);
                });
    Severity: Minor
    Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 45 mins to fix
    libraries/bugcore/js/src/observable/Observable.js on lines 239..244

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/observable/ObservationPropagator.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/query/Query.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/data/Collection.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/util/WeightedRandomizer.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/publisher/Publisher.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/query/QueryBuilder.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/data/UnorderedPair.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

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

            _constructor: function(catchFunction, forwardPromise) {
    
                this._super(forwardPromise);
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/promise/handlers/CatchHandler.js and 5 other locations - About 40 mins to fix
    libraries/bugcore/js/src/change/AddAtChange.js on lines 56..70
    libraries/bugcore/js/src/change/RemoveAtChange.js on lines 56..70
    libraries/bugcore/js/src/event/adapters/NodeJsEvent.js on lines 54..68
    libraries/bugcore/js/src/promise/handlers/CallbackHandler.js on lines 60..74
    libraries/bugcore/js/src/promise/handlers/FinallyHandler.js on lines 56..70

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/promise/Deferred.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/Observable.js on lines 67..81
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

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

            _constructor: function(callbackFunction, forwardPromise) {
    
                this._super(forwardPromise);
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/promise/handlers/CallbackHandler.js and 5 other locations - About 40 mins to fix
    libraries/bugcore/js/src/change/AddAtChange.js on lines 56..70
    libraries/bugcore/js/src/change/RemoveAtChange.js on lines 56..70
    libraries/bugcore/js/src/event/adapters/NodeJsEvent.js on lines 54..68
    libraries/bugcore/js/src/promise/handlers/CatchHandler.js on lines 56..70
    libraries/bugcore/js/src/promise/handlers/FinallyHandler.js on lines 56..70

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

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

            _constructor: function(finallyFunction, forwardPromise) {
    
                this._super(forwardPromise);
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/promise/handlers/FinallyHandler.js and 5 other locations - About 40 mins to fix
    libraries/bugcore/js/src/change/AddAtChange.js on lines 56..70
    libraries/bugcore/js/src/change/RemoveAtChange.js on lines 56..70
    libraries/bugcore/js/src/event/adapters/NodeJsEvent.js on lines 54..68
    libraries/bugcore/js/src/promise/handlers/CallbackHandler.js on lines 60..74
    libraries/bugcore/js/src/promise/handlers/CatchHandler.js on lines 56..70

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

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

            _constructor: function(type, arguments) {
    
                this._super(type);
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/event/adapters/NodeJsEvent.js and 5 other locations - About 40 mins to fix
    libraries/bugcore/js/src/change/AddAtChange.js on lines 56..70
    libraries/bugcore/js/src/change/RemoveAtChange.js on lines 56..70
    libraries/bugcore/js/src/promise/handlers/CallbackHandler.js on lines 60..74
    libraries/bugcore/js/src/promise/handlers/CatchHandler.js on lines 56..70
    libraries/bugcore/js/src/promise/handlers/FinallyHandler.js on lines 56..70

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

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

            _constructor: function(value, index) {
    
                this._super(value);
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/change/RemoveAtChange.js and 5 other locations - About 40 mins to fix
    libraries/bugcore/js/src/change/AddAtChange.js on lines 56..70
    libraries/bugcore/js/src/event/adapters/NodeJsEvent.js on lines 54..68
    libraries/bugcore/js/src/promise/handlers/CallbackHandler.js on lines 60..74
    libraries/bugcore/js/src/promise/handlers/CatchHandler.js on lines 56..70
    libraries/bugcore/js/src/promise/handlers/FinallyHandler.js on lines 56..70

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

    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() {
    
                this._super();
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/observable/Observable.js and 8 other locations - About 40 mins to fix
    libraries/bugcore/js/src/data/Collection.js on lines 77..91
    libraries/bugcore/js/src/data/UnorderedPair.js on lines 58..72
    libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 57..71
    libraries/bugcore/js/src/promise/Deferred.js on lines 56..70
    libraries/bugcore/js/src/publisher/Publisher.js on lines 66..80
    libraries/bugcore/js/src/query/Query.js on lines 58..72
    libraries/bugcore/js/src/query/QueryBuilder.js on lines 58..72
    libraries/bugcore/js/src/util/WeightedRandomizer.js on lines 60..74

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

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

            _constructor: function(value, index) {
    
                this._super(value);
    
    
    
    Severity: Major
    Found in libraries/bugcore/js/src/change/AddAtChange.js and 5 other locations - About 40 mins to fix
    libraries/bugcore/js/src/change/RemoveAtChange.js on lines 56..70
    libraries/bugcore/js/src/event/adapters/NodeJsEvent.js on lines 54..68
    libraries/bugcore/js/src/promise/handlers/CallbackHandler.js on lines 60..74
    libraries/bugcore/js/src/promise/handlers/CatchHandler.js on lines 56..70
    libraries/bugcore/js/src/promise/handlers/FinallyHandler.js on lines 56..70

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

    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