GeoKnow/Jassa-Core

View on GitHub

Showing 406 of 406 total issues

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

          function(v, vs) {
                if(vs.length === 0) {
                    return v;
                }
                var exp = {};
Severity: Major
Found in staging/sparql-parser.js and 1 other location - About 4 hrs to fix
staging/sparql-parser.js on lines 1291..1308

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

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

    createDirectTriples2: function(result) {
        if(this.step) {
            var sourceVar = this.parent.getVariable();
            var targetVar = this.getVariable();

Severity: Major
Found in lib/facete/FacetNode.js and 1 other location - About 4 hrs to fix
trash/to-port/facete/FacetNode.js on lines 182..208

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

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

        createDirectTriples2: function(result) {
            if(this.step) {
                var sourceVar = this.parent.getVariable();
                var targetVar = this.getVariable();
                
Severity: Major
Found in trash/to-port/facete/FacetNode.js and 1 other location - About 4 hrs to fix
lib/facete/FacetNode.js on lines 202..228

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

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

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

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

    var JoinNodeInfo = Class.create({
        initialize: function(joinNode, joinType) {
            this.joinNode = joinNode;
            this.joinType = joinType;
        },
    Severity: Major
    Found in lib/sparql/join/JoinNodeInfo.js and 1 other location - About 4 hrs to fix
    lib/sparql/join/JoinInfo.js on lines 4..21

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

    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

    var JoinInfo = Class.create({
        initialize: function(alias, joinType) {
            this.alias = alias;
            this.joinType = joinType;
        },
    Severity: Major
    Found in lib/sparql/join/JoinInfo.js and 1 other location - About 4 hrs to fix
    lib/sparql/join/JoinNodeInfo.js on lines 3..20

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

    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

              function(b, bs) {
                   var triples = b.triplesContext;
                   var toTest = null;
                    if(bs && typeof(bs) === 'object') {
                          if(bs.length != null) {
    Severity: Major
    Found in staging/sparql-parser.js and 1 other location - About 3 hrs to fix
    staging/sparql-parser.js on lines 653..666

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

    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

              function(b, bs) {
                   var triples = b.triplesContext;
                   var toTest = null;
                    if(bs && typeof(bs) === 'object') {
                          if(bs.length != null) {
    Severity: Major
    Found in staging/sparql-parser.js and 1 other location - About 3 hrs to fix
    staging/sparql-parser.js on lines 735..748

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

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

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

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

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

    Refactorings

    Further Reading

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

                    for(var i=0; gs && i<gs.length; i++) {
                        var g = gs[i];
                        if(g.kind === 'default') {
                            dataset['default'].push(g.graph);
                        } else {
    Severity: Major
    Found in staging/sparql-parser.js and 2 other locations - About 3 hrs to fix
    staging/sparql-parser.js on lines 230..237
    staging/sparql-parser.js on lines 276..283

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 99.

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

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

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

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

    Refactorings

    Further Reading

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

                    for(var i=0; gs && i<gs.length; i++) {
                        var g = gs[i];
                        if(g.kind === 'default') {
                            dataset['default'].push(g.graph);
                        } else {
    Severity: Major
    Found in staging/sparql-parser.js and 2 other locations - About 3 hrs to fix
    staging/sparql-parser.js on lines 133..140
    staging/sparql-parser.js on lines 276..283

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 99.

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

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

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

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

    Refactorings

    Further Reading

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

                    for(var i=0; gs && i<gs.length; i++) {
                        var g = gs[i];
                        if(g.kind === 'default') {
                            dataset['default'].push(g.graph);
                        } else {
    Severity: Major
    Found in staging/sparql-parser.js and 2 other locations - About 3 hrs to fix
    staging/sparql-parser.js on lines 133..140
    staging/sparql-parser.js on lines 230..237

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

    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

    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

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

          getPropertyNames: function() {
              var result = [];
              var steps = this.steps;
      
              for(var i = 0; i < steps.length; ++i) {
      Severity: Major
      Found in lib/facete/Path.js and 1 other location - About 3 hrs to fix
      trash/to-port/facete/Path.js on lines 120..131

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

      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

              getPropertyNames: function() {
                  var result = [];
                  var steps = this.steps;
                  
                  for(var i = 0; i < steps.length; ++i) {
      Severity: Major
      Found in trash/to-port/facete/Path.js and 1 other location - About 3 hrs to fix
      lib/facete/Path.js on lines 148..159

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

      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

      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

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

                    toJson: function() {
                        var result = [];
                        var steps = this.steps;
                
                        for(var i = 0; i < steps.length; ++i) {
                Severity: Major
                Found in lib/facete/Path.js and 1 other location - About 3 hrs to fix
                trash/to-port/facete/Path.js on lines 102..114

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

                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

                Severity
                Category
                Status
                Source
                Language