airbug/bugcore

View on GitHub

Showing 331 of 357 total issues

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

        removeByValue: function(value) {
            var _this = this;
            var keyCollection = this.valueKeyCollectionHashTable.get(value);
            if (!TypeUtil.isUndefined(keyCollection)) {
                keyCollection.forEach(function(key) {
Severity: Major
Found in libraries/bugcore/js/src/data/DualMultiMap.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/data/DualMultiMap.js on lines 125..134

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

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

        clone: function(deep) {
            var cloneList = new ObservableList();
            if (deep) {
                this.forEach(function(item){
                    cloneList.add(Obj.clone(item, true));
Severity: Major
Found in libraries/bugcore/js/src/observable/data/ObservableList.js and 6 other locations - About 2 hrs to fix
libraries/bugcore/js/src/core/Arr.js on lines 212..222
libraries/bugcore/js/src/data/Collection.js on lines 365..375
libraries/bugcore/js/src/data/List.js on lines 112..122
libraries/bugcore/js/src/data/Set.js on lines 63..73
libraries/bugcore/js/src/data/Stack.js on lines 100..110
libraries/bugcore/js/src/observable/data/ObservableSet.js on lines 60..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 88.

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

        indexOfFirst: function(value) {
            for (var i = 0, size = this.itemReflectArray.getLength(); i < size; i++) {
                if (Obj.equals(this.itemReflectArray.getAt(i), value)) {
                    return i;
                }
Severity: Major
Found in libraries/bugcore/js/src/data/List.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/data/Queue.js on lines 224..231

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

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

        clone: function(deep) {
            var cloneCollection = new Collection();
            if (deep) {
                this.forEach(function(item) {
                    cloneCollection.add(Obj.clone(item, true));
Severity: Major
Found in libraries/bugcore/js/src/data/Collection.js and 6 other locations - About 2 hrs to fix
libraries/bugcore/js/src/core/Arr.js on lines 212..222
libraries/bugcore/js/src/data/List.js on lines 112..122
libraries/bugcore/js/src/data/Set.js on lines 63..73
libraries/bugcore/js/src/data/Stack.js on lines 100..110
libraries/bugcore/js/src/observable/data/ObservableList.js on lines 69..79
libraries/bugcore/js/src/observable/data/ObservableSet.js on lines 60..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 88.

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

        removeObserver: function(changeTypes, pathPatterns, observerFunction, observerContext) {
            if (TypeUtil.isArray(pathPatterns)) {
                var observerSet = this.factoryObservers(pathPatterns, observerFunction, observerContext);
                this.detachObserversFromTypes(changeTypes, observerSet);
            } else {
Severity: Major
Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/observable/Observable.js on lines 320..328

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

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

        buildObservers: function(changeTypes, pathPatterns, observerFunction, observerContext) {
            if (TypeUtil.isArray(pathPatterns)) {
                var observerSet = this.factoryObservers(pathPatterns, observerFunction, observerContext);
                this.attachObserversToTypes(changeTypes, observerSet);
            } else {
Severity: Major
Found in libraries/bugcore/js/src/observable/Observable.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/observable/Observable.js on lines 170..178

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

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

        hashCode: function() {
            if (!this._hashCode) {
                this._hashCode = Obj.hashCode("[GraphEdge]" + Obj.hashCode(this.fromNode) + "_" + Obj.hashCode(this.toNode));
            }
            return this._hashCode;
Severity: Major
Found in libraries/bugcore/js/src/data/GraphEdge.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/event/EventListener.js on lines 142..149

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 87.

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

        hashCode: function() {
            if (!this._hashCode) {
                this._hashCode = Obj.hashCode("[EventListener]" +
                    Obj.hashCode(this.listenerFunction) + "_" +
                    Obj.hashCode(this.listenerContext));
Severity: Major
Found in libraries/bugcore/js/src/event/EventListener.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/data/GraphEdge.js on lines 116..121

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 87.

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 (key, value, previousValue) {

            this._super(PutChange.CHANGE_TYPE);


Severity: Major
Found in libraries/bugcore/js/src/change/PutChange.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/change/SetPropertyChange.js on lines 57..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 84.

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 (propertyName, propertyValue, previousValue) {

            this._super(SetPropertyChange.CHANGE_TYPE);


Severity: Major
Found in libraries/bugcore/js/src/change/SetPropertyChange.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/change/PutChange.js on lines 57..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 84.

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

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

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

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

Refactorings

Further Reading

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

                if (!this.containsEdgesTo(edge.getToNode())) {
                    edgeToSet = new Set();
                    this.toNodeToEdgeSetMap.put(edge.getToNode(), edgeToSet);
                } else {
                    edgeToSet = this.getEdgesTo(edge.getToNode());
Severity: Major
Found in libraries/bugcore/js/src/data/Graph.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/data/Graph.js on lines 228..233

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

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

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

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

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

Refactorings

Further Reading

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

                if (!this.containsEdgesFrom(edge.getFromNode())) {
                    edgeFromSet = new Set();
                    this.fromNodeToEdgeSetMap.put(edge.getFromNode(), edgeFromSet);
                } else {
                    edgeFromSet = this.getEdgesFrom(edge.getFromNode());
Severity: Major
Found in libraries/bugcore/js/src/data/Graph.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/data/Graph.js on lines 236..241

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

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

            this.execute(function(throwable) {
                if (!throwable) {
                    var args = ArgUtil.toArray(arguments);
                    args.shift();
                    deferred.resolve.apply(deferred, args);
Severity: Major
Found in libraries/bugcore/js/src/flow/builders/FlowBuilder.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/flow/builders/FlowBuilder.js on lines 95..103

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

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

            this.execute(function(throwable) {
                if (!throwable) {
                    var args = ArgUtil.toArray(arguments);
                    args.shift();
                    deferred.resolve.apply(deferred, args);
Severity: Major
Found in libraries/bugcore/js/src/flow/builders/FlowBuilder.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/flow/builders/FlowBuilder.js on lines 61..69

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

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

        detachObserverFromTypes: function(changeTypes, observer) {
            var _this = this;
            if (TypeUtil.isArray(changeTypes)) {
                changeTypes.forEach(function(changeType) {
                    _this.detachObserver(changeType, observer);
Severity: Major
Found in libraries/bugcore/js/src/observable/Observable.js and 3 other locations - About 2 hrs to fix
libraries/bugcore/js/src/event/EventReceiver.js on lines 211..220
libraries/bugcore/js/src/event/EventReceiver.js on lines 234..243
libraries/bugcore/js/src/observable/Observable.js on lines 224..233

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

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 (ObjectUtil.hasProperty(object, dontEnumPropertyName, options)) {
                    var args = _in ? [dontEnumPropertyName, object[dontEnumPropertyName]] : [object[dontEnumPropertyName], dontEnumPropertyName];
                    var result = FunctionUtil.call(iteratee, context, args.concat(object));
                    if (result === false) {
                        break;
Severity: Major
Found in libraries/bugcore/js/src/util/ObjectUtil.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/util/ObjectUtil.js on lines 416..422

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

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

        detachEventListenerFromTypes: function(eventTypes, eventListener) {
            var _this = this;
            if (TypeUtil.isArray(eventTypes)) {
                eventTypes.forEach(function(eventType) {
                    _this.detachEventListener(eventType, eventListener);
Severity: Major
Found in libraries/bugcore/js/src/event/EventReceiver.js and 3 other locations - About 2 hrs to fix
libraries/bugcore/js/src/event/EventReceiver.js on lines 211..220
libraries/bugcore/js/src/observable/Observable.js on lines 224..233
libraries/bugcore/js/src/observable/Observable.js on lines 265..274

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

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

        attachEventListenerToTypes: function(eventTypes, eventListener) {
            var _this = this;
            if (TypeUtil.isArray(eventTypes)) {
                eventTypes.forEach(function(eventType) {
                    _this.attachEventListener(eventType, eventListener);
Severity: Major
Found in libraries/bugcore/js/src/event/EventReceiver.js and 3 other locations - About 2 hrs to fix
libraries/bugcore/js/src/event/EventReceiver.js on lines 234..243
libraries/bugcore/js/src/observable/Observable.js on lines 224..233
libraries/bugcore/js/src/observable/Observable.js on lines 265..274

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

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

        attachObserverToTypes: function(changeTypes, observer) {
            var _this = this;
            if (TypeUtil.isArray(changeTypes)) {
                changeTypes.forEach(function(changeType) {
                    _this.attachObserver(changeType, observer);
Severity: Major
Found in libraries/bugcore/js/src/observable/Observable.js and 3 other locations - About 2 hrs to fix
libraries/bugcore/js/src/event/EventReceiver.js on lines 211..220
libraries/bugcore/js/src/event/EventReceiver.js on lines 234..243
libraries/bugcore/js/src/observable/Observable.js on lines 265..274

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

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 (ObjectUtil.hasProperty(object, propertyName, options)) {
                var args = _in ? [propertyName, object[propertyName]] : [object[propertyName], propertyName];
                var result = FunctionUtil.apply(iteratee, context, args.concat(object));
                if (result === false) {
                    break;
Severity: Major
Found in libraries/bugcore/js/src/util/ObjectUtil.js and 1 other location - About 2 hrs to fix
libraries/bugcore/js/src/util/ObjectUtil.js on lines 428..434

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

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