GeoKnow/Jassa-Core

View on GitHub

Showing 245 of 406 total issues

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

            var cleanupClient = function() {
                if(clientId != null) {
                    var isKnown = clients[clientId];

                    if(!isKnown) {
Severity: Major
Found in lib/service/query_execution/QueryExecutionCacheOld.js and 1 other location - About 1 hr to fix
lib/util/CacheUtils.js on lines 72..82

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

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

          function(i, args) {
                var fcall = {};
                fcall.token = "expression";
                fcall.expressionType = 'irireforfunction'
                fcall.iriref = i;
Severity: Major
Found in staging/sparql-parser.js and 1 other location - About 1 hr to fix
staging/sparql-parser.js on lines 1766..1774

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

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(e1, e2) {
                var ex = {};
                ex.token = 'expression'
                ex.expressionType = 'builtincall'
                ex.builtincall = 'langmatches'
Severity: Major
Found in staging/sparql-parser.js and 1 other location - About 1 hr to fix
staging/sparql-parser.js on lines 1657..1664

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

          function(e1, e2) {
              var ex = {};
              ex.token = 'expression';
              ex.expressionType = 'builtincall';
              ex.builtincall = 'sameterm';
Severity: Major
Found in staging/sparql-parser.js and 1 other location - About 1 hr to fix
staging/sparql-parser.js on lines 1545..1553

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

    fetchIntQe: function(queryExecution, variable) {
        var self = this;
        var result = queryExecution.execSelect().then(function(rs) {
            var r = self.resultSetToInt(rs, variable);
            return r;
Severity: Major
Found in lib/service/ServiceUtils.js and 1 other location - About 1 hr to fix
lib/service/ServiceUtils.js on lines 146..154

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

    fetchList: function(queryExecution, variable) {
        var self = this;
        var result = queryExecution.execSelect().then(function(rs) {
            var r = self.resultSetToList(rs, variable);
            return r;
Severity: Major
Found in lib/service/ServiceUtils.js and 1 other location - About 1 hr to fix
lib/service/ServiceUtils.js on lines 166..174

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

            _(this.tableMod.getSortConditions()).each(function(sc) {
                var cid = sc.getColumnId();
                if(cid === id) {
                    var sortType = sc.getSortType();
                   
Severity: Major
Found in trash/to-port/facete/table/ColumnView.js and 1 other location - About 1 hr to fix
lib/facete/table/ColumnView.js on lines 27..34

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

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

        this.tableMod.getSortConditions().forEach(function(sc) {
            var cid = sc.getColumnId();
            if(cid === id) {
                var sortType = sc.getSortType();

Severity: Major
Found in lib/facete/table/ColumnView.js and 1 other location - About 1 hr to fix
trash/to-port/facete/table/ColumnView.js on lines 27..34

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

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

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

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

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

Refactorings

Further Reading

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

          function(v) {
                var ex = {};
                ex.token = 'expression'
                ex.expressionType = 'builtincall'
                ex.builtincall = 'bound'
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(arg) {
              var ex = {};
              ex.token = 'expression';
              ex.expressionType = 'builtincall';
              ex.builtincall = 'isuri';
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(arg) {
              var ex = {};
              ex.token = 'expression';
              ex.expressionType = 'builtincall';
              ex.builtincall = 'isblank';
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(e) {
                var ex = {};
                ex.token = 'expression';
                ex.expressionType = 'builtincall';
                ex.builtincall = 'uri'
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(e) {
                var ex = {};
                ex.token = 'expression'
                ex.expressionType = 'builtincall'
                ex.builtincall = 'str'
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(e) {
                var ex = {};
                ex.token = 'expression';
                ex.expressionType = 'builtincall';
                ex.builtincall = 'iri'
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(ggp) {
              var ex = {};
              ex.token = 'expression';
              ex.expressionType = 'builtincall';
              ex.builtincall = 'notexists';
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694

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

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

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

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

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

Refactorings

Further Reading

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

          function(ggp) {
              var ex = {};
              ex.token = 'expression';
              ex.expressionType = 'builtincall';
              ex.builtincall = 'exists';
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(e) {
                var ex = {};
                ex.token = 'expression'
                ex.expressionType = 'builtincall'
                ex.builtincall = 'datatype'
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1635..1643
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

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

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

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

Refactorings

Further Reading

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

          function(arg) {
              var ex = {};
              ex.token = 'expression';
              ex.expressionType = 'builtincall';
              ex.builtincall = 'isliteral';
Severity: Major
Found in staging/sparql-parser.js and 10 other locations - About 1 hr to fix
staging/sparql-parser.js on lines 1525..1533
staging/sparql-parser.js on lines 1534..1542
staging/sparql-parser.js on lines 1554..1562
staging/sparql-parser.js on lines 1565..1573
staging/sparql-parser.js on lines 1576..1584
staging/sparql-parser.js on lines 1587..1595
staging/sparql-parser.js on lines 1646..1654
staging/sparql-parser.js on lines 1665..1673
staging/sparql-parser.js on lines 1686..1694
staging/sparql-parser.js on lines 1696..1704

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

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

    for(var i = 0; i < json.length; ++i) {
        var item = json[i];

        var step = Step.fromJson(item);

Severity: Major
Found in lib/facete/Path.js and 1 other location - About 1 hr to fix
lib/sparql/VarUtils.js on lines 88..92

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

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

    equals: function(that) {
        var result =
            that != null &&
            that.isUri != null &&
            that.isUri() &&
Severity: Major
Found in lib/rdf/node/Node_Uri.js and 1 other location - About 1 hr to fix
lib/rdf/node/Var.js on lines 26..34

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

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