verse/verse-javascript

View on GitHub
src/verse.js

Summary

Maintainability
F
3 days
Test Coverage

Function onSocketMessage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        onSocketMessage = function onSocketMessage(message, config) {
            var responseData;

            if (message.data instanceof ArrayBuffer) {
                if (!response.checkHeader(message.data)) {
Severity: Minor
Found in src/verse.js - About 1 hr to fix

    Function layerCreate has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

                layerCreate: function layerCreate(prio, nodeId, parentLayerId, dataType, count, customType) {
    Severity: Minor
    Found in src/verse.js - About 45 mins to fix

      Function tagCreate has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                  tagCreate: function tagCreate(prio, nodeId, tagGroupId, dataType, count, customType) {
      Severity: Minor
      Found in src/verse.js - About 45 mins to fix

        Function tagSet has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    tagSet: function tagSet(prio, nodeId, tagGroupId, tagId, dataType, values) {
        Severity: Minor
        Found in src/verse.js - About 45 mins to fix

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

                      layerSetItems: function layerSetItems(prio, nodeId, layerId, dataTypes, items) {
          Severity: Minor
          Found in src/verse.js - About 35 mins to fix

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

                        layerCreate: function layerCreate(prio, nodeId, parentLayerId, dataType, count, customType) {
                            var buf = layer.create(nodeId, parentLayerId, dataType, count, customType);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 1 other location - About 1 hr to fix
            src/verse.js on lines 395..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 66.

            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

                        tagCreate: function tagCreate(prio, nodeId, tagGroupId, dataType, count, customType) {
                            var buf = tag.create(nodeId, tagGroupId, dataType, count, customType);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 1 other location - About 1 hr to fix
            src/verse.js on lines 442..446

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

            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

                        nodePerm: function nodePerm(prio, nodeId, userId, perm) {
                            var buf = node.perm(nodeId, userId, perm);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 2 other locations - About 1 hr to fix
            src/verse.js on lines 408..412
            src/verse.js on lines 491..495

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

            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

                        layerUnSetItems: function layerUnSetItems(prio, nodeId, layerId, itemIds) {
                            var buf = layer.unsetItems(nodeId, layerId, itemIds);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 2 other locations - About 1 hr to fix
            src/verse.js on lines 268..272
            src/verse.js on lines 408..412

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

            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

                        tagDestroy: function tagDestroy(prio, nodeId, tagGroupId, tagId) {
                            var buf = tag.destroy(nodeId, tagGroupId, tagId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 2 other locations - About 1 hr to fix
            src/verse.js on lines 268..272
            src/verse.js on lines 491..495

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

            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

                        nodeOwner: function nodeOwner(prio, nodeId, userId) {
                            var buf = node.owner(nodeId, userId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        nodeLock: function nodeLock(prio, nodeId, avatarId) {
                            var buf = node.lock(nodeId, avatarId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        layerSubscribe: function layerSubscribe(prio, nodeId, layerId) {
                            var buf = layer.subscribe(nodeId, layerId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 478..482

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

            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

                        layerUnSubscribe: function layerUnSubscribe(prio, nodeId, layerId) {
                            var buf = layer.unsubscribe(nodeId, layerId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470

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

            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

                        nodeUnLock: function nodeUnLock(prio, nodeId, avatarId) {
                            var buf = node.unlock(nodeId, avatarId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        nodePrio: function nodePrio(prio, nodeId, priority) {
                            var buf = node.prio(nodeId, priority);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        layerDestroy: function layerDestroy(prio, nodeId, layerId) {
                            var buf = layer.destroy(nodeId, layerId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        tagGroupUnSubscribe: function tagGroupUnSubscribe(prio, nodeId, tagGroupId) {
                            var buf = tagGroup.unsubscribe(nodeId, tagGroupId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        nodeLink: function nodeLink(prio, parenNodeId, childNodeId) {
                            var buf = node.link(parenNodeId, childNodeId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        tagGroupDestroy: function tagGroupDestroy(prio, nodeId, tagGroupId) {
                            var buf = tagGroup.destroy(nodeId, tagGroupId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 365..369
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

            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

                        tagGroupSubscribe: function tagGroupSubscribe(prio, nodeId, tagGroupId) {
                            var buf = tagGroup.subscribe(nodeId, tagGroupId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 10 other locations - About 1 hr to fix
            src/verse.js on lines 255..259
            src/verse.js on lines 291..295
            src/verse.js on lines 303..307
            src/verse.js on lines 315..319
            src/verse.js on lines 327..331
            src/verse.js on lines 353..357
            src/verse.js on lines 377..381
            src/verse.js on lines 454..458
            src/verse.js on lines 466..470
            src/verse.js on lines 478..482

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

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

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

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

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

            Refactorings

            Further Reading

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

                        nodeSubscribe: function nodeSubscribe(prio, nodeId) {
                            var buf = node.subscribe(nodeId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 3 other locations - About 1 hr to fix
            src/verse.js on lines 221..225
            src/verse.js on lines 243..247
            src/verse.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 57.

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

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

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

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

            Refactorings

            Further Reading

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

                        nodeDestroy: function nodeDestroy(prio, nodeId) {
                            var buf = node.destroy(nodeId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 3 other locations - About 1 hr to fix
            src/verse.js on lines 232..236
            src/verse.js on lines 243..247
            src/verse.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 57.

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

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

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

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

            Refactorings

            Further Reading

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

                        nodeUmask: function nodeUmask(prio, permission) {
                            var buf = node.umask(permission);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 3 other locations - About 1 hr to fix
            src/verse.js on lines 221..225
            src/verse.js on lines 232..236
            src/verse.js on lines 243..247

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

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

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

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

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

            Refactorings

            Further Reading

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

                        nodeUnSubscribe: function nodeUnSubscribe(prio, nodeId) {
                            var buf = node.unsubscribe(nodeId);
                            buf = request.message(buf);
                            myWebscoket.send(buf);
                        },
            Severity: Major
            Found in src/verse.js and 3 other locations - About 1 hr to fix
            src/verse.js on lines 221..225
            src/verse.js on lines 232..236
            src/verse.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 57.

            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