acsone/alfodoo

View on GitHub
cmis_web/static/lib/cmisjs/cmis.0.3.1.js

Summary

Maintainability
F
2 wks
Test Coverage

Function createSession has 768 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  lib.createSession = function (url) {

    /**
     * @class CmisSession
     *
Severity: Major
Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 3 days to fix

    File cmis.0.3.1.js has 794 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    ;
    (function (root, factory) {
      'use strict';
      if (typeof define === 'function' && define.amd) {
        define(['superagent'], function (superagent) {
    Severity: Major
    Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 day to fix

      Function CmisRequest has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function CmisRequest(req, text) {
      
            var callback_ok = _noop;
            var callback_notOk = _globalNotOk;
            var callback_error = _globalError;
      Severity: Major
      Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 2 hrs to fix

        Function createDocumentFromSource has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            session.createDocumentFromSource = function (parentId, sourceId, content, input, mimeType, versioningState, policies, addACEs, removeACEs, options) {
        Severity: Major
        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 hr to fix

          Function createDocumentFromSource has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              session.createDocumentFromSource = function (parentId, sourceId, content, input, mimeType, versioningState, policies, addACEs, removeACEs, options) {
                var options = _fill(options);
                if ('string' == typeof input) {
                  input = {
                    'cmis:name': input
          Severity: Minor
          Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 hr to fix

            Function checkIn has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                session.checkIn = function (objectId, major, input, content, comment, policies, addACEs, removeACEs, options) {
            Severity: Major
            Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 hr to fix

              Function createDocument has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  session.createDocument = function (parentId, content, input, mimeType, versioningState, policies, addACEs, removeACEs, options) {
              Severity: Major
              Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 hr to fix

                Function createDocument has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    session.createDocument = function (parentId, content, input, mimeType, versioningState, policies, addACEs, removeACEs, options) {
                      var options = _fill(options);
                      if ('string' == typeof input) {
                        input = {
                          'cmis:name': input
                Severity: Minor
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 hr to fix

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

                      session.createItem = function (folderId, properties, policies, addACEs, removeACEs, options) {
                  Severity: Minor
                  Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 45 mins to fix

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

                        session.createPolicy = function (folderId, properties, policies, addACEs, removeACEs, options) {
                    Severity: Minor
                    Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 45 mins to fix

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

                          session.createRelationship = function (properties, policies, addACEs, removeACEs, options) {
                      Severity: Minor
                      Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                            session.getContentChanges = function (changeLogToken, includeProperties, includePolicyIds, includeACL, options) {
                        Severity: Minor
                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                              session.deleteTree = function (objectId, allVersions, unfileObjects, continueOnFailure, options) {
                          Severity: Minor
                          Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                session.setContentStream = function (objectId, content, overwriteFlag, filename, options) {
                            Severity: Minor
                            Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                  session.appendContentStream = function (objectId, content, isLastChunk, filename, options) {
                              Severity: Minor
                              Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                    session.createFolder = function (parentId, input, policies, addACEs, removeACEs) {
                                Severity: Minor
                                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                      session.getObjectRelationships = function (objectId, includeSubRelationshipTypes, relationshipDirection, typeId, options) {
                                  Severity: Minor
                                  Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                        session.applyACL = function (objectId, addACEs, removeACEs, propagation, options) {
                                    Severity: Minor
                                    Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                          session.bulkUpdateProperties = function (objectIds, properties, addSecondaryTypeIds, removeSecondaryTypeIds, options) {
                                      Severity: Minor
                                      Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

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

                                            session.createItem = function (folderId, properties, policies, addACEs, removeACEs, options) {
                                              options = _fill(options);
                                              options.objectId = folderId;
                                              _setProps(properties, options);
                                              if (policies) {
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 5 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 476..492

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

                                        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

                                            session.createPolicy = function (folderId, properties, policies, addACEs, removeACEs, options) {
                                              options = _fill(options);
                                              options.objectId = folderId;
                                              _setProps(properties, options);
                                              if (policies) {
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 5 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 504..520

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

                                        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

                                            session.getObject = function (objectId, returnVersion, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'object';
                                              options.objectId = objectId;
                                              if (returnVersion == 'latestmajor' || returnVersion == 'latest') {
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 3 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 745..754

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

                                        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

                                            session.getProperties = function (objectId, returnVersion, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'properties';
                                              options.objectId = objectId;
                                              if (returnVersion == 'latestmajor' || returnVersion == 'latest') {
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 3 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 140..149

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 113.

                                        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

                                            session.getFolderTree = function (folderId, depth, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'folderTree';
                                              if (depth) {
                                                options.depth = depth;
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 3 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 667..676

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

                                        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

                                            session.getDescendants = function (folderId, depth, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'descendants';
                                              if (depth) {
                                                options.depth = depth;
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 3 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 685..694

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

                                        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

                                            session.removePolicy = function (objectId, policyId, options) {
                                              var options = _fill(options);
                                              options.objectId = objectId;
                                              options.policyId = policyId;
                                              options.cmisaction = 'removePolicy';
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1109..1116

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

                                            session.applyPolicy = function (objectId, policyId, options) {
                                              var options = _fill(options);
                                              options.objectId = objectId;
                                              options.policyId = policyId;
                                              options.cmisaction = 'applyPolicy';
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1125..1133

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

                                            session.updateType = function (type, options) {
                                              options = _fill(options);
                                              options.cmisaction = 'updateType';
                                              options.type = JSON.stringify(type);
                                              return new CmisRequest(_post(session.defaultRepository.repositoryUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 596..602

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

                                        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

                                            session.createType = function (type, options) {
                                              options = _fill(options);
                                              options.cmisaction = 'createType';
                                              options.type = JSON.stringify(type);
                                              return new CmisRequest(_post(session.defaultRepository.repositoryUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 610..617

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

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getChildren = function (objectId, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'children';
                                              options.objectId = objectId;
                                              return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getFolderParent = function (folderId, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'parent';
                                              options.objectId = folderId;
                                              return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getParents = function (objectId, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'parents';
                                              options.objectId = objectId;
                                              return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.deleteType = function (typeId, options) {
                                              options = _fill(options);
                                              options.cmisaction = 'deleteType';
                                              options.typeId = typeId;
                                              return new CmisRequest(_post(session.defaultRepository.repositoryUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.cancelCheckOut = function (objectId, options) {
                                              var options = _fill(options);
                                              options.objectId = objectId;
                                              options.cmisaction = 'cancelCheckOut';
                                              return new CmisRequest(_post(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 929..935
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 977..984
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1056..1063
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1093..1100

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.deleteContentStream = function (objectId, options) {
                                              var options = _fill(options);
                                              options.objectId = objectId;
                                              options.cmisaction = 'deleteContent';
                                              return new CmisRequest(_post(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 977..984
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 992..999
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1056..1063
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1093..1100

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getAllVersions = function (versionSeriesId, options) {
                                              var options = _fill(options);
                                              options.versionSeriesId = versionSeriesId;
                                              options.cmisselector = 'versions';
                                              return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 929..935
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 977..984
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 992..999
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1093..1100

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getAppliedPolicies = function (objectId, options) {
                                              var options = _fill(options);
                                              options.objectId = objectId;
                                              options.cmisselector = 'policies';
                                              return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 929..935
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 977..984
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 992..999
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1056..1063

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getAllowableActions = function (objectId, options) {
                                              options = _fill(options);
                                              options.cmisselector = 'allowableActions';
                                              options.objectId = objectId;
                                              return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.checkOut = function (objectId, options) {
                                              var options = _fill(options);
                                              options.objectId = objectId;
                                              options.cmisaction = 'checkOut';
                                              return new CmisRequest(_post(session.defaultRepository.rootFolderUrl)
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 929..935
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 992..999
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1056..1063
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1093..1100

                                        Duplicated Code

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

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

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

                                        Tuning

                                        This issue has a mass of 82.

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

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

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

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

                                        Refactorings

                                        Further Reading

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

                                            session.getLastResult = function (options) {
                                              options = _fill(options);
                                              options.cmisaction = 'lastResult';
                                              return new CmisRequest(_post(session.defaultRepository.repositoryUrl)
                                                .send(options));
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 1 hr to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 256..261

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

                                        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

                                            session.getRepositoryInfo = function (options) {
                                              options = _fill(options);
                                              options.cmisselector = 'repositoryInfo';
                                              return new CmisRequest(_get(session.defaultRepository.repositoryUrl)
                                                .query(options));
                                        Severity: Major
                                        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 1 other location - About 1 hr to fix
                                        cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 638..643

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

                                        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