airbug/bugcore

View on GitHub

Showing 357 of 357 total issues

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

        _constructor: function(value, index) {

            this._super(value);


Severity: Major
Found in libraries/bugcore/js/src/change/RemoveAtChange.js and 5 other locations - About 40 mins to fix
libraries/bugcore/js/src/change/AddAtChange.js on lines 56..70
libraries/bugcore/js/src/event/adapters/NodeJsEvent.js on lines 54..68
libraries/bugcore/js/src/promise/handlers/CallbackHandler.js on lines 60..74
libraries/bugcore/js/src/promise/handlers/CatchHandler.js on lines 56..70
libraries/bugcore/js/src/promise/handlers/FinallyHandler.js on lines 56..70

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        _constructor: function() {

            this._super();


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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        resolveProps: function(objects) {
            this.validatePromiseState();
            this.validateObjects(objects);
            this.doResolveProps(objects);
            return this;
Severity: Minor
Found in libraries/bugcore/js/src/promise/Promise.js and 2 other locations - About 40 mins to fix
libraries/bugcore/js/src/promise/Promise.js on lines 319..324
libraries/bugcore/js/src/promise/Promise.js on lines 341..346

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

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

        resolveRace: function(iterables) {
            this.validatePromiseState();
            this.validateIterables(iterables);
            this.doResolveRace(iterables);
            return this;
Severity: Minor
Found in libraries/bugcore/js/src/promise/Promise.js and 2 other locations - About 40 mins to fix
libraries/bugcore/js/src/promise/Promise.js on lines 319..324
libraries/bugcore/js/src/promise/Promise.js on lines 330..335

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

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

                    _this.resolveIterable(iterable, function(values) {
                        _this.getResolvedValueList().set(index, values);
                        _this.incrementResolvedValues();
                        _this.tryResolving(fulfilledCallback, rejectedCallback);
                    }, function(reasons) {
Severity: Minor
Found in libraries/bugcore/js/src/promise/resolvers/AllResolver.js and 2 other locations - About 40 mins to fix
libraries/bugcore/js/src/promise/resolvers/AllResolver.js on lines 86..90
libraries/bugcore/js/src/promise/resolvers/PropsResolver.js on lines 84..88

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

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

                    }, function(reasons) {
                        _this.getResolvedReasonList().set(index, reasons);
                        _this.incrementResolvedValues();
                        _this.tryResolving(fulfilledCallback, rejectedCallback);
                    });
Severity: Minor
Found in libraries/bugcore/js/src/promise/resolvers/AllResolver.js and 2 other locations - About 40 mins to fix
libraries/bugcore/js/src/promise/resolvers/AllResolver.js on lines 82..86
libraries/bugcore/js/src/promise/resolvers/PropsResolver.js on lines 84..88

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

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

                    _this.resolveObject(object, function(resolvedObject) {
                        _this.getResolvedValueList().set(index, resolvedObject);
                        _this.incrementResolvedValues();
                        _this.tryResolving(fulfilledCallback, rejectedCallback);
                    }, function(reasons) {
Severity: Minor
Found in libraries/bugcore/js/src/promise/resolvers/PropsResolver.js and 2 other locations - About 40 mins to fix
libraries/bugcore/js/src/promise/resolvers/AllResolver.js on lines 82..86
libraries/bugcore/js/src/promise/resolvers/AllResolver.js on lines 86..90

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

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

        catch: function(catchFunction) {
            var handler = this.generateCatchHandler(catchFunction);
            this.processHandlers();
            return handler.getForwardPromise();
        },
Severity: Minor
Found in libraries/bugcore/js/src/promise/Promise.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/promise/Promise.js on lines 289..293

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

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

        addElseIfBuilder: function(elseIfBuilder) {
            if (this.elseFlowBuilder) {
                throw Throwables.bug("IllegalState", {}, "IfFlow already has an ElseFlowBuilder");
            }
            this.elseIfBuilderList.add(elseIfBuilder);
Severity: Minor
Found in libraries/bugcore/js/src/flow/flows/If.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/flow/flows/If.js on lines 147..152

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

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

        finally: function(finallyFunction) {
            var handler = this.generateFinallyHandler(finallyFunction);
            this.processHandlers();
            return handler.getForwardPromise();
        },
Severity: Minor
Found in libraries/bugcore/js/src/promise/Promise.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/promise/Promise.js on lines 279..283

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

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

        forEach: function(func) {
            this.keyValueHashTable.forEach(function(valueCollection) {
                valueCollection.forEach(func);
            });
        },
Severity: Minor
Found in libraries/bugcore/js/src/data/DualMultiMap.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/stream/Supplier.js on lines 178..182

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

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

        removeAllNodes: function(nodes) {
            var _this = this;
            nodes.forEach(function(node) {
                _this.removeNode(node);
            });
Severity: Major
Found in libraries/bugcore/js/src/data/Graph.js and 4 other locations - About 40 mins to fix
libraries/bugcore/js/src/core/Arr.js on lines 138..143
libraries/bugcore/js/src/data/Graph.js on lines 207..212
libraries/bugcore/js/src/data/Graph.js on lines 360..365
libraries/bugcore/js/src/data/ReferenceGraph.js on lines 164..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 48.

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

        push: function(item) {
            this.consumers.forEach(function(consumer) {
                consumer.accept(item);
            });
        },
Severity: Minor
Found in libraries/bugcore/js/src/stream/Supplier.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/data/DualMultiMap.js on lines 86..90

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

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

        addAll: function(items) {
            var _this = this;
            items.forEach(function(item) {
                _this.add(item);
            });
Severity: Major
Found in libraries/bugcore/js/src/core/Arr.js and 4 other locations - About 40 mins to fix
libraries/bugcore/js/src/data/Graph.js on lines 207..212
libraries/bugcore/js/src/data/Graph.js on lines 360..365
libraries/bugcore/js/src/data/Graph.js on lines 394..399
libraries/bugcore/js/src/data/ReferenceGraph.js on lines 164..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 48.

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

        removeAllEdges: function(edges) {
            var _this = this;
            edges.forEach(function(edge) {
                _this.removeEdge(edge);
            });
Severity: Major
Found in libraries/bugcore/js/src/data/Graph.js and 4 other locations - About 40 mins to fix
libraries/bugcore/js/src/core/Arr.js on lines 138..143
libraries/bugcore/js/src/data/Graph.js on lines 207..212
libraries/bugcore/js/src/data/Graph.js on lines 394..399
libraries/bugcore/js/src/data/ReferenceGraph.js on lines 164..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 48.

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

        removeValues: function(values) {
            var _this = this;
            values.forEach(function(value) {
                _this.removeValue(value);
            });
Severity: Major
Found in libraries/bugcore/js/src/data/ReferenceGraph.js and 4 other locations - About 40 mins to fix
libraries/bugcore/js/src/core/Arr.js on lines 138..143
libraries/bugcore/js/src/data/Graph.js on lines 207..212
libraries/bugcore/js/src/data/Graph.js on lines 360..365
libraries/bugcore/js/src/data/Graph.js on lines 394..399

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

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

        resolveAll: function(iterables) {
            this.validatePromiseState();
            this.validateIterables(iterables);
            this.doResolveAll(iterables);
            return this;
Severity: Minor
Found in libraries/bugcore/js/src/promise/Promise.js and 2 other locations - About 40 mins to fix
libraries/bugcore/js/src/promise/Promise.js on lines 330..335
libraries/bugcore/js/src/promise/Promise.js on lines 341..346

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

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

        addAllElseIfBuilders: function(elseIfFlowBuilders) {
            if (this.elseFlowBuilder) {
                throw Throwables.bug("IllegalState", {}, "IfFlow already has an ElseFlowBuilder");
            }
            this.elseIfBuilderList.addAll(elseIfFlowBuilders);
Severity: Minor
Found in libraries/bugcore/js/src/flow/flows/If.js and 1 other location - About 40 mins to fix
libraries/bugcore/js/src/flow/flows/If.js on lines 157..162

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

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

        removeNodesForValues: function(values) {
            var _this = this;
            values.forEach(function(value) {
                _this.removeNodeForValue(value);
            });
Severity: Major
Found in libraries/bugcore/js/src/data/Graph.js and 4 other locations - About 40 mins to fix
libraries/bugcore/js/src/core/Arr.js on lines 138..143
libraries/bugcore/js/src/data/Graph.js on lines 360..365
libraries/bugcore/js/src/data/Graph.js on lines 394..399
libraries/bugcore/js/src/data/ReferenceGraph.js on lines 164..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 48.

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

Function _constructor has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        _constructor: function(type, argName, argValue, message, causes) {
Severity: Minor
Found in libraries/bugcore/js/src/throwable/ArgumentBug.js - About 35 mins to fix
    Severity
    Category
    Status
    Source
    Language