Nhogs/popoto

View on GitHub
src/queryviewer/queryviewer.js

Summary

Maintainability
F
1 wk
Test Coverage
F
9%

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

queryviewer.updateQuery = function () {

    // Remove all query span elements
    queryviewer.queryConstraintSpanElements = queryviewer.queryConstraintSpanElements.data([]);
    queryviewer.querySpanElements = queryviewer.querySpanElements.data([]);
Severity: Major
Found in src/queryviewer/queryviewer.js - About 2 hrs to fix

    Function generateConstraintData has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    queryviewer.generateConstraintData = function (links, nodes) {
        var elmts = [], id = 0;
    
        // Add query starter
        elmts.push(
    Severity: Minor
    Found in src/queryviewer/queryviewer.js - About 1 hr to fix

      Function generateData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      queryviewer.generateData = function (links, nodes) {
          var elmts = [], options = [], id = 0;
      
          // Add a span for each link and its target node
          links.forEach(function (l) {
      Severity: Minor
      Found in src/queryviewer/queryviewer.js - About 1 hr to fix

        Avoid too many return statements within this function.
        Open

                            return "ppt-span";
        Severity: Major
        Found in src/queryviewer/queryviewer.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return "ppt-span";
          Severity: Major
          Found in src/queryviewer/queryviewer.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                return "ppt-span-value";
            Severity: Major
            Found in src/queryviewer/queryviewer.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                  return "ppt-span-group";
              Severity: Major
              Found in src/queryviewer/queryviewer.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return "ppt-span-group";
                Severity: Major
                Found in src/queryviewer/queryviewer.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return "ppt-span-value";
                  Severity: Major
                  Found in src/queryviewer/queryviewer.js - About 30 mins to fix

                    TODO found
                    Open

                    // TODO add option nodes in generated query when no value is available
                    Severity: Minor
                    Found in src/queryviewer/queryviewer.js by fixme

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

                        if (hoveredSpan.ref) {
                            var linkElmt = graph.svg.selectAll("#" + graph.link.gID + " > g").filter(function (d) {
                                return d === hoveredSpan.ref;
                            });
                            linkElmt.select("path").classed("ppt-link-hover", false);
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 1 day to fix
                    src/queryviewer/queryviewer.js on lines 240..258

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

                    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

                        if (hoveredSpan.ref) {
                            var linkElmt = graph.svg.selectAll("#" + graph.link.gID + " > g").filter(function (d) {
                                return d === hoveredSpan.ref;
                            });
                            linkElmt.select("path").classed("ppt-link-hover", true);
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 1 day to fix
                    src/queryviewer/queryviewer.js on lines 293..310

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

                    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

                        queryviewer.queryConstraintSpanElements
                            .attr("id", function (d) {
                                return d.id
                            })
                            .attr("class", function (d) {
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 1 day to fix
                    src/queryviewer/queryviewer.js on lines 88..115

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

                    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

                        queryviewer.querySpanElements
                            .attr("id", function (d) {
                                return d.id
                            })
                            .attr("class", function (d) {
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 1 day to fix
                    src/queryviewer/queryviewer.js on lines 59..86

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

                    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

                    queryviewer.clickSpan = function () {
                        var clickedSpan = d3.select(this).data()[0];
                    
                        if (!clickedSpan.isLink && clickedSpan.ref) {
                            var nodeElmt = graph.svg.selectAll("#" + graph.node.gID + " > g").filter(function (d) {
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 5 hrs to fix
                    src/queryviewer/queryviewer.js on lines 261..271

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

                    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

                    queryviewer.rightClickSpan = function () {
                        var clickedSpan = d3.select(this).data()[0];
                    
                        if (!clickedSpan.isLink && clickedSpan.ref) {
                            var nodeElmt = graph.svg.selectAll("#" + graph.node.gID + " > g").filter(function (d) {
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 5 hrs to fix
                    src/queryviewer/queryviewer.js on lines 273..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 153.

                    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

                        queryviewer.querySpanElements = queryviewer.querySpanElements.enter().append("span")
                            .on("contextmenu", queryviewer.rightClickSpan)
                            .on("click", queryviewer.clickSpan)
                            .on("mouseover", queryviewer.mouseOverSpan)
                            .on("mouseout", queryviewer.mouseOutSpan)
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 2 hrs to fix
                    src/queryviewer/queryviewer.js on lines 44..49

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

                    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

                        queryviewer.queryConstraintSpanElements = queryviewer.queryConstraintSpanElements.enter().append("span")
                            .on("contextmenu", queryviewer.rightClickSpan)
                            .on("click", queryviewer.clickSpan)
                            .on("mouseover", queryviewer.mouseOverSpan)
                            .on("mouseout", queryviewer.mouseOutSpan)
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 2 hrs to fix
                    src/queryviewer/queryviewer.js on lines 51..56

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

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

                            if (targetNode.type === graph.node.NodeTypes.GROUP) {
                                options.push(
                                    {
                                        id: id++,
                                        type: targetNode.type,
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 2 other locations - About 2 hrs to fix
                    src/queryviewer/queryviewer.js on lines 139..148
                    src/queryviewer/queryviewer.js on lines 201..210

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

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

                                if (sourceNode.type === graph.node.NodeTypes.GROUP) {
                                    elmts.push(
                                        {
                                            id: id++,
                                            type: sourceNode.type,
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 2 other locations - About 2 hrs to fix
                    src/queryviewer/queryviewer.js on lines 189..198
                    src/queryviewer/queryviewer.js on lines 201..210

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

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

                                if (sourceNode.type === graph.node.NodeTypes.GROUP) {
                                    elmts.push(
                                        {
                                            id: id++,
                                            type: sourceNode.type,
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 2 other locations - About 2 hrs to fix
                    src/queryviewer/queryviewer.js on lines 139..148
                    src/queryviewer/queryviewer.js on lines 189..198

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

                    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

                                    } else {
                                        elmts.push(
                                            {
                                                id: id++,
                                                type: targetNode.type,
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 1 hr to fix
                    src/queryviewer/queryviewer.js on lines 214..223

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

                    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

                                if (targetNode.type !== graph.node.NodeTypes.GROUP) {
                                    elmts.push(
                                        {
                                            id: id++,
                                            type: targetNode.type,
                    Severity: Major
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 1 hr to fix
                    src/queryviewer/queryviewer.js on lines 162..171

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

                    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

                                elmts.push({id: id++, isLink: true, term: provider.link.getSemanticValue(l), ref: l});
                    Severity: Minor
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 35 mins to fix
                    src/queryviewer/queryviewer.js on lines 150..150

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

                    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

                            if (l.type === graph.link.LinkTypes.RELATION && targetNode.type !== graph.node.NodeTypes.GROUP && (targetNode.value === undefined || targetNode.value.length === 0)) {
                    Severity: Minor
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 35 mins to fix
                    src/queryviewer/queryviewer.js on lines 138..138

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

                    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

                            if (l.type === graph.link.LinkTypes.RELATION && targetNode.type !== graph.node.NodeTypes.GROUP && targetNode.value !== undefined && targetNode.value.length > 0) {
                    Severity: Minor
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 35 mins to fix
                    src/queryviewer/queryviewer.js on lines 200..200

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

                    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

                                elmts.push({id: id++, isLink: true, term: provider.link.getSemanticValue(l), ref: l});
                    Severity: Minor
                    Found in src/queryviewer/queryviewer.js and 1 other location - About 35 mins to fix
                    src/queryviewer/queryviewer.js on lines 212..212

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

                    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