bbc/flashheart

View on GitHub

Showing 45 of 73 total issues

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

(function() {
    var source = document.getElementsByClassName('prettyprint source linenums');
    var i = 0;
    var lineNumber = 0;
    var lineId;
Severity: Major
Found in docs/scripts/linenumber.js and 1 other location - About 1 day to fix
docconfig/template/static/scripts/linenumber.js on lines 2..25

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

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

(function() {
    var source = document.getElementsByClassName('prettyprint source linenums');
    var i = 0;
    var lineNumber = 0;
    var lineId;
Severity: Major
Found in docconfig/template/static/scripts/linenumber.js and 1 other location - About 1 day to fix
docs/scripts/linenumber.js on lines 2..25

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

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

exports.findOne = function ( obj, qu ) {
    var expression, _i, _len;

    var query = parseQueryExpression( qu );
    for ( _i = 0, _len = query.length; _i < _len; _i++ ) {
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 6 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 813..829

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

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

exports.findOneKey = function ( obj, qu ) {
    var expression, _i, _len;

    var query = parseQueryExpression( qu );
    for ( _i = 0, _len = query.length; _i < _len; _i++ ) {
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 6 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 788..804

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

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

    $not       : function ( qu, value, record ) {

        var result = false;
        sys.each( qu.operands, function ( expr ) {
            if ( expr.path ) {
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 5 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 647..661

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

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

    $nor       : function ( qu, value, record ) {
        var isOr = false;
        sys.each( qu.operands, function ( expr ) {
            if ( expr.path ) {
                expr.splitPath = expr.splitPath || splitPath( expr.path );
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 5 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 671..687

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

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

exports.findKeys = function ( obj, qu ) {
    var expression, _i, _len;

    var query = parseQueryExpression( qu );
    for ( _i = 0, _len = query.length; _i < _len; _i++ ) {
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 4 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 750..761

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

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

exports.find = function ( obj, qu ) {
    var expression, _i, _len;

    var query = parseQueryExpression( qu );
    for ( _i = 0, _len = query.length; _i < _len; _i++ ) {
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 4 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 769..780

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

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

    $ne        : function ( qu, value ) {
        if ( sys.isArray( value ) ) {
            return sys.find( value, function ( entry ) {
                return JSON.stringify( qu.operands[0] ) !== JSON.stringify( entry );
            } ) !== void 0;
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 4 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 360..368

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

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

    $eq        : function ( qu, value ) {
        if ( sys.isArray( value ) ) {
            return sys.find( value, function ( entry ) {
                return JSON.stringify( qu.operands[0] ) === JSON.stringify( entry );
            } ) !== void 0;
Severity: Major
Found in docconfig/template/fixtures/documents/probe.js and 1 other location - About 4 hrs to fix
docconfig/template/fixtures/documents/probe.js on lines 380..388

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

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

    on       : function ( listener, listenerContext, priority ) {
        if ( sys.isNumber( listenerContext ) ) {
            priority = listenerContext;
            listenerContext = null;
        }
Severity: Major
Found in docconfig/template/fixtures/mixins/signalable.js and 1 other location - About 4 hrs to fix
docconfig/template/fixtures/mixins/signalable.js on lines 102..113

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

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

    once     : function ( listener, listenerContext, priority ) {
        if ( sys.isNumber( listenerContext ) ) {
            priority = listenerContext;
            listenerContext = null;
        }
Severity: Major
Found in docconfig/template/fixtures/mixins/signalable.js and 1 other location - About 4 hrs to fix
docconfig/template/fixtures/mixins/signalable.js on lines 83..94

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

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

    min           : function ( query, iterator, thisobj ) {
        if ( sys.isPlainObject( query ) ) {
            thisobj = thisobj || this;
            return sys.min( this.find( query ), iterator, thisobj );
        } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 99..107
docconfig/template/fixtures/documents/collector.js on lines 138..146
docconfig/template/fixtures/documents/collector.js on lines 157..165
docconfig/template/fixtures/documents/collector.js on lines 193..201
docconfig/template/fixtures/documents/collector.js on lines 211..219
docconfig/template/fixtures/documents/collector.js on lines 338..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 94.

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

    countBy       : function ( query, iterator, thisobj ) {
        if ( sys.isPlainObject( query ) ) {
            thisobj = thisobj || this;
            return sys.countBy( this.find( query ), iterator, thisobj );
        } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 99..107
docconfig/template/fixtures/documents/collector.js on lines 157..165
docconfig/template/fixtures/documents/collector.js on lines 193..201
docconfig/template/fixtures/documents/collector.js on lines 211..219
docconfig/template/fixtures/documents/collector.js on lines 229..237
docconfig/template/fixtures/documents/collector.js on lines 338..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 94.

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

    map           : function ( query, iterator, thisobj ) {
        if ( sys.isPlainObject( query ) ) {
            thisobj = thisobj || this;
            return sys.map( this.find( query ), iterator, thisobj );
        } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 138..146
docconfig/template/fixtures/documents/collector.js on lines 157..165
docconfig/template/fixtures/documents/collector.js on lines 193..201
docconfig/template/fixtures/documents/collector.js on lines 211..219
docconfig/template/fixtures/documents/collector.js on lines 229..237
docconfig/template/fixtures/documents/collector.js on lines 338..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 94.

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

        flatten     : function ( query, iterator, thisobj ) {
            if ( sys.isPlainObject( query ) ) {
                thisobj = thisobj || this;
                return sys.flatten( this.find( query ), iterator, thisobj );
            } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 99..107
docconfig/template/fixtures/documents/collector.js on lines 138..146
docconfig/template/fixtures/documents/collector.js on lines 157..165
docconfig/template/fixtures/documents/collector.js on lines 193..201
docconfig/template/fixtures/documents/collector.js on lines 211..219
docconfig/template/fixtures/documents/collector.js on lines 229..237

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

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

    sortBy        : function ( query, iterator, thisobj ) {
        if ( sys.isPlainObject( query ) ) {
            thisobj = thisobj || this;
            return sys.sortBy( this.find( query ), iterator, thisobj );
        } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 99..107
docconfig/template/fixtures/documents/collector.js on lines 138..146
docconfig/template/fixtures/documents/collector.js on lines 157..165
docconfig/template/fixtures/documents/collector.js on lines 211..219
docconfig/template/fixtures/documents/collector.js on lines 229..237
docconfig/template/fixtures/documents/collector.js on lines 338..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 94.

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

    max           : function ( query, iterator, thisobj ) {
        if ( sys.isPlainObject( query ) ) {
            thisobj = thisobj || this;
            return sys.max( this.find( query ), iterator, thisobj );
        } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 99..107
docconfig/template/fixtures/documents/collector.js on lines 138..146
docconfig/template/fixtures/documents/collector.js on lines 157..165
docconfig/template/fixtures/documents/collector.js on lines 193..201
docconfig/template/fixtures/documents/collector.js on lines 229..237
docconfig/template/fixtures/documents/collector.js on lines 338..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 94.

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

    groupBy       : function ( query, iterator, thisobj ) {
        if ( sys.isPlainObject( query ) ) {
            thisobj = thisobj || this;
            return sys.groupBy( this.find( query ), iterator, thisobj );
        } else {
Severity: Major
Found in docconfig/template/fixtures/documents/collector.js and 6 other locations - About 2 hrs to fix
docconfig/template/fixtures/documents/collector.js on lines 99..107
docconfig/template/fixtures/documents/collector.js on lines 138..146
docconfig/template/fixtures/documents/collector.js on lines 193..201
docconfig/template/fixtures/documents/collector.js on lines 211..219
docconfig/template/fixtures/documents/collector.js on lines 229..237
docconfig/template/fixtures/documents/collector.js on lines 338..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 94.

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

    sys.each( parts, function ( part ) {
        lastParentName = part;
        lastParent = context;
        context = context[part];
        lastPartName = part;
Severity: Major
Found in docconfig/template/fixtures/documents/binder.js and 1 other location - About 2 hrs to fix
docconfig/template/fixtures/documents/binder.js on lines 42..50

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

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