IHTSDO/component-identifier-service

View on GitHub

Showing 213 of 1,102 total issues

Function processJob has 406 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function processJob(record){

    var request=JSON.parse(record.request);
    if (!request || !request.type || request.type==null){
        var lightJob={
Severity: Major
Found in blogic/BackEndJobService.js - About 2 days to fix

    Function insertRecords has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
    Open

    var insertRecords=function(records, operation, callback) {
        Sync(function () {
            var err;
            try {
                sctid.bulkInsert.sync(null, records);
    Severity: Minor
    Found in blogic/SCTIdBulkDataManager.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    File SCTIdBulkDataManager.js has 738 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Created by ar on 7/16/15.
     */
    var dbInit=require("../config/dbInit");
    var stateMachine=require("../model/StateMachine");
    Severity: Major
    Found in blogic/SCTIdBulkDataManager.js - About 1 day to fix

      Function checkSctid has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

      var checkSctid = function (sctid, callback) {
          var err = "";
      
          var partitionId = "";
          var checkDigit = null;
      Severity: Minor
      Found in blogic/SCTIdDataManager.js - About 1 day to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      File SchemeIdBulkDataManager.js has 626 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * Created by ar on 7/16/15.
       */
      var dbInit=require("../config/dbInit");
      var stateMachine=require("../model/StateMachine");
      Severity: Major
      Found in blogic/SchemeIdBulkDataManager.js - About 1 day to fix

        File SCTIdDataManager.js has 622 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Created by ar on 7/16/15.
         */
        var dbInit=require("../config/dbInit");
        var stateMachine=require("../model/StateMachine");
        Severity: Major
        Found in blogic/SCTIdDataManager.js - About 1 day to fix

          Function processJob has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
          Open

          function processJob(record){
          
              var request=JSON.parse(record.request);
              if (!request || !request.type || request.type==null){
                  var lightJob={
          Severity: Minor
          Found in blogic/BackEndJobService.js - About 1 day to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function insertRecords has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
          Open

          var insertRecords=function(records, scheme, key, autoSysId, callback) {
              Sync(function () {
                  var err;
                  try {
                      schemeid.bulkInsert.sync(null, records);
          Severity: Minor
          Found in blogic/SchemeIdBulkDataManager.js - About 1 day to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          File SchemeIdDataManager.js has 461 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Created by ar on 7/16/15.
           */
          var dbInit=require("../config/dbInit");
          var stateMachine=require("../model/StateMachine");
          Severity: Minor
          Found in blogic/SchemeIdDataManager.js - About 7 hrs to fix

            Function findFieldSelect has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
            Open

            job.findFieldSelect=function(query, fields,limit, skip,orderBy, callback){
                db.getDB(function (err,connection)
                {
                    if (err) throw err;
                    if (!query){
            Severity: Minor
            Found in model/job.js - About 6 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function checkSctid has 172 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var checkSctid = function (sctid, callback) {
                var err = "";
            
                var partitionId = "";
                var checkDigit = null;
            Severity: Major
            Found in blogic/SCTIdDataManager.js - About 6 hrs to fix

              File BackEndJobService.js has 450 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * Created by ar on 7/31/15.
               */
              
              var job=require("../model/JobType");
              Severity: Minor
              Found in blogic/BackEndJobService.js - About 6 hrs to fix

                File SctidBulk.js has 433 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Created by alo on 7/13/15.
                 */
                'use strict';
                
                
                Severity: Minor
                Found in controllers/SctidBulk.js - About 6 hrs to fix

                  File Sctid.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * Created by alo on 7/13/15.
                   */
                  'use strict';
                  
                  
                  Severity: Minor
                  Found in controllers/Sctid.js - About 6 hrs to fix

                    Function registerSctid has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var registerSctid=function (operation, callback) {
                    
                        if (!operation.autoSysId) {
                            getSctidBySystemId(operation.namespace, operation.systemId, function (err, sctid) {
                                if (err) {
                    Severity: Minor
                    Found in blogic/SCTIdDataManager.js - About 4 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function registerSchemeId has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var registerSchemeId=function (scheme, operation, callback){
                    
                        if (!operation.autoSysId) {
                            getSchemeIdBySystemId(scheme, operation.systemId, function (err, schemeId) {
                                if (err) {
                    Severity: Minor
                    Found in blogic/SchemeIdDataManager.js - About 4 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method run has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                    Open

                        @Override
                        public void run(ApplicationArguments args) throws Exception {
                            System.out.println("\nThis process will synchronise the sequence of every partition within every namespace\n" +
                                    "from the source CIS instance to the target CIS instance\n" +
                                    "where the partition is available on both sides.\n");

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function getStats has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports.getStats = function getStats(username, callback){
                        dbInit.getDB(function (err, pdb, model) {
                            if (err)
                                throw err;
                            else{
                    Severity: Major
                    Found in blogic/HomeDataManager.js - About 4 hrs to fix

                      Function registerSctidsSmallRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                      Open

                      var registerSctidsSmallRequest=function (operation, callback) {
                      
                          Sync(function () {
                              try {
                                  var cont = 0;
                      Severity: Minor
                      Found in blogic/SCTIdBulkDataManager.js - About 4 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function registerSchemeIds has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                      Open

                      var registerSchemeIds=function ( operation, callback) {
                          Sync(function () {
                              try {
                                  var cont = 0;
                                  var records = [];
                      Severity: Minor
                      Found in blogic/SchemeIdBulkDataManager.js - About 4 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Severity
                      Category
                      Status
                      Source
                      Language