GeoKnow/Jassa-Core

View on GitHub

Showing 161 of 406 total issues

Function parse has 2317 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function parse(input) {
    var options = arguments.length > 1 ? arguments[1] : {},

        peg$FAILED = {},

Severity: Major
Found in staging/sparql-parser.js - About 1 wk to fix

    File sparql-parser.js has 2341 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    define([],function(){
     return (function() {
      /*
       * Generated by PEG.js 0.8.0.
       *
    Severity: Major
    Found in staging/sparql-parser.js - About 6 days to fix

      Function str has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
      Open

      function str(key, holder) {
      
          // Produce a string from holder[key].
      
          var i, // The loop counter.
      Severity: Minor
      Found in lib/ext/JSONCanonical.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 peg$parseRule has 198 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function peg$parseRule(index) {
            var bc    = peg$bytecode[index],
                ip    = 0,
                ips   = [],
                end   = bc.length,
      Severity: Major
      Found in staging/sparql-parser.js - About 7 hrs to fix

        Function Class has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
        Open

        var Class = (function() {
        
        
            // Claus: Copied together code from PrototypeJS to make its class file self-contained.
            // There is also a klass lib in bower, but I collected too many battle scars
        Severity: Minor
        Found in lib/ext/Class.js - About 7 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 serializeRec has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
        Open

            serializeRec: function(obj, context) {
                var result;
        
                // var id = context.getOrCreateId(obj);
        
        
        Severity: Minor
        Found in lib/util/Serializer.js - About 5 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 Class has 132 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Class = (function() {
        
        
            // Claus: Copied together code from PrototypeJS to make its class file self-contained.
            // There is also a klass lib in bower, but I collected too many battle scars
        Severity: Major
        Found in lib/ext/Class.js - About 5 hrs to fix

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

              createAttrQuery: function(attrQuery, attrVar, isLeftJoin, filterConcept, limit, offset, forceSubQuery) {
          
                  var attrConcept = new Concept(new ElementSubQuery(attrQuery), attrVar);
          
                  var renamedFilterConcept = ConceptUtils.createRenamedConcept(attrConcept, filterConcept);
          Severity: Minor
          Found in lib/sparql/ConceptUtils.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

          Query has 32 functions (exceeds 20 allowed). Consider refactoring.
          Open

          var Query = Class.create({
              classLabel: 'jassa.sparql.Query',
          
              initialize: function() {
                  this.type = 0; // select, construct, ask, describe
          Severity: Minor
          Found in lib/sparql/Query.js - About 4 hrs to fix

            Function execSelect has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                execSelect: function() {
                    //var self = this;
            
                    var cacheKey = this.cacheKey;
            
            
            Severity: Major
            Found in lib/service/query_execution/QueryExecutionCacheOld.js - About 3 hrs to fix

              Function createQuery has 77 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      createQuery: function() {
                          var tableMod = this.tableMod;
                          var element = this.elementFactory.createElement();
                          
                          if(!element) {
              Severity: Major
              Found in trash/to-port/facete/table/QueryFactoryTableMod.js - About 3 hrs to fix

                File ConceptUtils.js has 294 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                var Node = require('../rdf/node/Node');
                var NodeFactory = require('../rdf/NodeFactory');
                var Triple = require('../rdf/Triple');
                
                var HashMap = require('../util/collection/HashMap');
                Severity: Minor
                Found in lib/sparql/ConceptUtils.js - About 3 hrs to fix

                  Function serializeRec has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      serializeRec: function(obj, context) {
                          var result;
                  
                          // var id = context.getOrCreateId(obj);
                  
                  
                  Severity: Major
                  Found in lib/util/Serializer.js - About 3 hrs to fix

                    Function createAttrQuery has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        createAttrQuery: function(attrQuery, attrVar, isLeftJoin, filterConcept, limit, offset, forceSubQuery) {
                    
                            var attrConcept = new Concept(new ElementSubQuery(attrQuery), attrVar);
                    
                            var renamedFilterConcept = ConceptUtils.createRenamedConcept(attrConcept, filterConcept);
                    Severity: Major
                    Found in lib/sparql/ConceptUtils.js - About 3 hrs to fix

                      Function createRexLookupService has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          createRexLookupService: function(sparqlService) {
                      
                              var store = new StoreFacade(sparqlService, {
                      //            'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
                      //            'llo': 'http://www.linklion.org/ontology#'
                      Severity: Major
                      Found in lib/sponate/RexUtils.js - About 3 hrs to fix

                        Function createQueryFacet has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            createQueryFacet: function(element, tableMod) {
                        
                                if(!element) {
                                    return null;
                                }
                        Severity: Major
                        Found in lib/facete/QueryUtils.js - About 2 hrs to fix

                          FacetNode has 25 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                              ns.FacetNode = Class.create({
                                  initialize: function(varNode, step, parent, root) {
                                      this.parent = parent;
                                      this.root = root;
                                      if(!this.root) {
                          Severity: Minor
                          Found in trash/to-port/facete/FacetNode.js - About 2 hrs to fix

                            FacetNode has 24 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            var FacetNode = Class.create({
                                initialize: function(varNode, step, parent, root) {
                                    this.parent = parent;
                                    this.root = root;
                                    if(!this.root) {
                            Severity: Minor
                            Found in lib/facete/FacetNode.js - About 2 hrs to fix

                              Function str has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function str(key, holder) {
                              
                                  // Produce a string from holder[key].
                              
                                  var i, // The loop counter.
                              Severity: Major
                              Found in lib/ext/JSONCanonical.js - About 2 hrs to fix

                                Function compile has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        compile: function(elem, attrs) {
                                
                                            if(!this.instanceId) {
                                                this.instanceId = 0;
                                            }
                                Severity: Major
                                Found in demo/facet-typeahead-odple/facet-typeahead.js - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language