airbug/bugcore

View on GitHub

Showing 331 of 357 total issues

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

    DataUtil.mapIn = function(iterable, iteratee, options) {
        return DataUtil.map(iterable, iteratee, DataUtil.options(options, {in: true}));
    };
Severity: Major
Found in libraries/bugcore/js/src/util/DataUtil.js and 4 other locations - About 50 mins to fix
libraries/bugcore/js/src/util/ArrayUtil.js on lines 97..99
libraries/bugcore/js/src/util/DataUtil.js on lines 96..98
libraries/bugcore/js/src/util/DataUtil.js on lines 139..141
libraries/bugcore/js/src/util/ObjectUtil.js on lines 216..218

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 = 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 300..304

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

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

        targetTask('lint', {
            properties: {
                targetPaths: buildProject.getProperty("lint.targetPaths"),
                ignores: buildProject.getProperty("lint.ignorePatterns"),
                lintTasks: [
Severity: Minor
Found in buildbug.js and 1 other location - About 50 mins to fix
buildbug.js on lines 316..329

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

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

        getChildNodes: function() {
            if (!this.childNodes) {
                this.childNodes = new List();
            }
            return this.childNodes;
Severity: Minor
Found in libraries/bugcore/js/src/data/TreeNode.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/reflect/Reflect.js on lines 78..83

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

        getNotifier: function() {
            if (!this.notifier) {
                this.notifier = new Notifier();
            }
            return this.notifier;
Severity: Minor
Found in libraries/bugcore/js/src/reflect/Reflect.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/data/TreeNode.js on lines 91..96

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

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 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 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 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 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/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 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/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 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(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 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

Severity
Category
Status
Source
Language