airbug/bugcore

View on GitHub

Showing 331 of 357 total issues

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

    Collections.ensureList = function(items) {
        if (!Class.doesExtend(items, List)) {
            return new List(items);
        } else {
            return /** @type {List.<I>} */(items);
Severity: Major
Found in libraries/bugcore/js/src/data/Collections.js and 5 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collections.js on lines 92..98
libraries/bugcore/js/src/data/Collections.js on lines 120..126
libraries/bugcore/js/src/data/Collections.js on lines 133..139
libraries/bugcore/js/src/data/Collections.js on lines 147..153
libraries/bugcore/js/src/data/Collections.js on lines 161..167

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

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

        nextIndexValuePair: function() {
            var index = this.nextIndex();
            var value = this.array[index];
            return {
                index: index,
Severity: Major
Found in libraries/bugcore/js/src/core/iterators/ArrayIterator.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/core/iterators/ObjectIterator.js on lines 200..207

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

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

    Collections.ensureMultiListMap = function(map) {
        if (!Class.doesExtend(map, MultiListMap)) {
            return new MultiListMap(map);
        } else {
            return /** @type {MultiListMap.<I>} */(map);
Severity: Major
Found in libraries/bugcore/js/src/data/Collections.js and 5 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collections.js on lines 92..98
libraries/bugcore/js/src/data/Collections.js on lines 106..112
libraries/bugcore/js/src/data/Collections.js on lines 120..126
libraries/bugcore/js/src/data/Collections.js on lines 147..153
libraries/bugcore/js/src/data/Collections.js on lines 161..167

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

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

            if ((Class.doesImplement(items, IArrayable) && !Class.doesImplement(items, ICollection))) {
                collection = new Collection(items);
            } else {
                collection = /** @type {(ICollection.<*> | Array.<*>)} */(items);
            }
Severity: Major
Found in libraries/bugcore/js/src/data/WeightedList.js and 3 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collection.js on lines 279..283
libraries/bugcore/js/src/data/List.js on lines 226..230
libraries/bugcore/js/src/data/WeightedList.js on lines 226..230

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

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

    Collections.ensureMap = function(map) {
        if (!Class.doesExtend(map, Map)) {
            return new Map(map);
        } else {
            return /** @type {Map.<K, V>} */(map);
Severity: Major
Found in libraries/bugcore/js/src/data/Collections.js and 5 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collections.js on lines 92..98
libraries/bugcore/js/src/data/Collections.js on lines 106..112
libraries/bugcore/js/src/data/Collections.js on lines 133..139
libraries/bugcore/js/src/data/Collections.js on lines 147..153
libraries/bugcore/js/src/data/Collections.js on lines 161..167

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

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

        nextKeyValuePair: function() {
            var key     = this.nextKey();
            var value   = this.object[key];
            return {
                key: key,
Severity: Major
Found in libraries/bugcore/js/src/core/iterators/ObjectIterator.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/core/iterators/ArrayIterator.js on lines 162..169

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

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(items) {

            this._super();


libraries/bugcore/js/src/observable/data/ObservableMap.js on lines 75..89

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

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

    Collections.ensureCollection = function(items) {
        if (!Class.doesExtend(items, Collection)) {
            return new Collection(items);
        } else {
            return /** @type {Collection.<I>} */(items);
Severity: Major
Found in libraries/bugcore/js/src/data/Collections.js and 5 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collections.js on lines 106..112
libraries/bugcore/js/src/data/Collections.js on lines 120..126
libraries/bugcore/js/src/data/Collections.js on lines 133..139
libraries/bugcore/js/src/data/Collections.js on lines 147..153
libraries/bugcore/js/src/data/Collections.js on lines 161..167

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

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

            if ((Class.doesImplement(items, IArrayable) && !Class.doesImplement(items, ICollection))) {
                collection = new Collection(items);
            } else {
                collection = /** @type {(ICollection.<*> | Array.<*>)} */(items);
            }
Severity: Major
Found in libraries/bugcore/js/src/data/List.js and 3 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collection.js on lines 279..283
libraries/bugcore/js/src/data/WeightedList.js on lines 135..139
libraries/bugcore/js/src/data/WeightedList.js on lines 226..230

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

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

            if ((Class.doesImplement(values, IArrayable) && !Class.doesImplement(values, ICollection))) {
                collection = new Collection(values);
            } else {
                collection = /** @type {ICollection<*>} */(values);
            }
Severity: Major
Found in libraries/bugcore/js/src/data/Collection.js and 3 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/List.js on lines 226..230
libraries/bugcore/js/src/data/WeightedList.js on lines 135..139
libraries/bugcore/js/src/data/WeightedList.js on lines 226..230

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

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

    Collections.ensureQueue = function(items) {
        if (!Class.doesExtend(items, Queue)) {
            return new Queue(items);
        } else {
            return /** @type {Queue.<I>} */(items);
Severity: Major
Found in libraries/bugcore/js/src/data/Collections.js and 5 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collections.js on lines 92..98
libraries/bugcore/js/src/data/Collections.js on lines 106..112
libraries/bugcore/js/src/data/Collections.js on lines 120..126
libraries/bugcore/js/src/data/Collections.js on lines 133..139
libraries/bugcore/js/src/data/Collections.js on lines 161..167

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

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

    Collections.ensureSet = function(items) {
        if (!Class.doesExtend(items, Set)) {
            return new Set(items);
        } else {
            return /** @type {Set.<I>} */(items);
Severity: Major
Found in libraries/bugcore/js/src/data/Collections.js and 5 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collections.js on lines 92..98
libraries/bugcore/js/src/data/Collections.js on lines 106..112
libraries/bugcore/js/src/data/Collections.js on lines 120..126
libraries/bugcore/js/src/data/Collections.js on lines 133..139
libraries/bugcore/js/src/data/Collections.js on lines 147..153

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

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

            if ((Class.doesImplement(items, IArrayable) && !Class.doesImplement(items, ICollection))) {
                collection = new Collection(items);
            } else {
                collection = /** @type {(ICollection.<*> | Array.<*>)} */(items);
            }
Severity: Major
Found in libraries/bugcore/js/src/data/WeightedList.js and 3 other locations - About 1 hr to fix
libraries/bugcore/js/src/data/Collection.js on lines 279..283
libraries/bugcore/js/src/data/List.js on lines 226..230
libraries/bugcore/js/src/data/WeightedList.js on lines 135..139

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

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(map) {

            this._super();


Severity: Major
Found in libraries/bugcore/js/src/observable/data/ObservableMap.js and 1 other location - About 1 hr to fix
libraries/bugcore/js/src/observable/data/ObservableCollection.js on lines 77..91

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

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

        getEdgesTo: function(toNode) {
            var edgeSet = this.toNodeToEdgeSetMap.get(toNode);
            if (!edgeSet) {
                edgeSet = new Set();
            }
Severity: Minor
Found in libraries/bugcore/js/src/data/Graph.js and 1 other location - About 55 mins to fix
libraries/bugcore/js/src/data/Graph.js on lines 303..309

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

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

        getEdgesFrom: function(fromNode) {
            var edgeSet = this.fromNodeToEdgeSetMap.get(fromNode);
            if (!edgeSet) {
                edgeSet = new Set();
            }
Severity: Minor
Found in libraries/bugcore/js/src/data/Graph.js and 1 other location - About 55 mins to fix
libraries/bugcore/js/src/data/Graph.js on lines 316..322

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

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

        startSyncWhileLoop: function() {
            this.syncCall = true;
            while (this.syncCall && this.whileCheck) {
                this.runWhileAssertion();
            }
Severity: Minor
Found in libraries/bugcore/js/src/flow/flows/WhileParallel.js and 1 other location - About 50 mins to fix
libraries/bugcore/js/src/flow/flows/WhileSeries.js on lines 176..181

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

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

        addEventPropagator: function(eventPropagator) {
            if (!this.eventPropagatorList.contains(eventPropagator)) {
                this.eventPropagatorList.add(eventPropagator);
            }
        },
Severity: Major
Found in libraries/bugcore/js/src/event/EventPropagator.js and 2 other locations - About 50 mins to fix
libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 93..97
libraries/bugcore/js/src/validator/ValidatorGroup.js on lines 143..147

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

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

        addValidator: function(validator) {
            if (!this.validatorList.contains(validator)) {
                this.validatorList.add(validator);
            }
        },
Severity: Major
Found in libraries/bugcore/js/src/validator/ValidatorGroup.js and 2 other locations - About 50 mins to fix
libraries/bugcore/js/src/event/EventPropagator.js on lines 107..111
libraries/bugcore/js/src/observable/ObservationPropagator.js on lines 93..97

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

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

        add: function(value) {
            var result = this.observed.add(value);
            if (result) {
                this.notifyObservers(new AddChange(value))
            }
libraries/bugcore/js/src/observable/data/ObservableCollection.js on lines 207..213

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

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