jmdobry/reheat

View on GitHub
old_test/reheat/connection/index.test.js

Summary

Maintainability
F
3 wks
Test Coverage

File index.test.js has 715 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*jshint loopfunc:true*/

var errors = require('../../../../build/instrument/lib/support/errors'),
    SandboxedModule = require('sandboxed-module'),
    Connection = SandboxedModule.require('../../../../build/instrument/lib/connection', {
Severity: Major
Found in old_test/reheat/connection/index.test.js - About 1 day to fix

    Function getPoolSize has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getPoolSize: function (test) {
            var _this = this;
    
            test.expect(7);
    
    
    Severity: Minor
    Found in old_test/reheat/connection/index.test.js - About 1 hr to fix

      Function test1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              test1: function (test) {
                  var _this = this;
                  test.expect(8);
      
                  var queue = [];
      Severity: Minor
      Found in old_test/reheat/connection/index.test.js - About 1 hr to fix

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

            acquire: function (test) {
                var _this = this;
        
                test.expect(11);
        
        
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 527..552

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

        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

            destroy: function (test) {
                var _this = this;
        
                test.expect(11);
        
        
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 554..579

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

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

                min: function (test) {
                    var _this = this;
                    test.expect(10);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                host: function (test) {
                    var _this = this;
                    test.expect(12);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                idleTimeoutMillis: function (test) {
                    var _this = this;
                    test.expect(10);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                refreshIdle: function (test) {
                    var _this = this;
                    test.expect(12);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453

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

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

                reapIntervalMillis: function (test) {
                    var _this = this;
                    test.expect(10);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                db: function (test) {
                    var _this = this;
                    test.expect(12);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                max: function (test) {
                    var _this = this;
                    test.expect(10);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                priorityRange: function (test) {
                    var _this = this;
                    test.expect(10);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                authKey: function (test) {
                    var _this = this;
                    test.expect(12);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                port: function (test) {
                    var _this = this;
                    test.expect(10);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 274..303
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

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

                name: function (test) {
                    var _this = this;
                    test.expect(12);
        
                    var queue = [];
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 10 other locations - About 1 day to fix
        old_test/reheat/connection/index.test.js on lines 154..183
        old_test/reheat/connection/index.test.js on lines 184..213
        old_test/reheat/connection/index.test.js on lines 214..243
        old_test/reheat/connection/index.test.js on lines 244..273
        old_test/reheat/connection/index.test.js on lines 304..333
        old_test/reheat/connection/index.test.js on lines 334..363
        old_test/reheat/connection/index.test.js on lines 364..393
        old_test/reheat/connection/index.test.js on lines 394..423
        old_test/reheat/connection/index.test.js on lines 424..453
        old_test/reheat/connection/index.test.js on lines 454..483

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

        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

                optionsAndCallback: function (test) {
                    var _this = this;
                    test.expect(2);
        
                    this.connection.configure({
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 3 hrs to fix
        old_test/reheat/connection/index.test.js on lines 63..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 103.

        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

                optionsOnly: function (test) {
                    var _this = this;
                    test.expect(2);
        
                    this.connection.configure({
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 3 hrs to fix
        old_test/reheat/connection/index.test.js on lines 75..87

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

        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.connection.acquire().then(function (conn) {
                                    var deferred = Promise.defer();
                                    setTimeout(function () {
                                        _this.connection.release(conn);
                                        deferred.resolve();
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 2 hrs to fix
        old_test/reheat/connection/index.test.js on lines 718..725

        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

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

                                _this.connection.acquire().then(function (conn) {
                                    var deferred = Promise.defer();
                                    setTimeout(function () {
                                        _this.connection.release(conn);
                                        deferred.resolve();
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 2 hrs to fix
        old_test/reheat/connection/index.test.js on lines 710..717

        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

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

                    publicBottom = this.connection.pooled(privateBottom = function (client, arg, cb) {
                        test.ok('close' in client);
                        test.equal(typeof client.close, 'function');
                        test.equal(arg, 'hello');
                        cb(null, arg);
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 2 hrs to fix
        old_test/reheat/connection/index.test.js on lines 645..650

        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

                    publicFn = this.connection.pooled(privateFn = function (client, arg, cb) {
                        test.ok('close' in client);
                        test.equal(typeof client.close, 'function');
                        test.equal(arg, 'hello');
                        cb(null, arg);
        Severity: Major
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 2 hrs to fix
        old_test/reheat/connection/index.test.js on lines 662..667

        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

                    publicFn('hello', function (err, result) {
                        test.ifError(err);
                        test.equal(result, 'hello');
                        test.done();
                    });
        Severity: Minor
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 40 mins to fix
        old_test/reheat/connection/index.test.js on lines 680..684

        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

                    publicTop('hello', function (err, retVal) {
                        test.ifError(err);
                        test.equal(retVal, 'hello');
                        test.done();
                    });
        Severity: Minor
        Found in old_test/reheat/connection/index.test.js and 1 other location - About 40 mins to fix
        old_test/reheat/connection/index.test.js on lines 652..656

        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

        There are no issues that match your filters.

        Category
        Status