zktest/src/main/webapp/js/d3.layout.js

Summary

Maintainability
F
2 wks
Test Coverage

File d3.layout.js has 1549 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function(){d3.layout = {};
// Implements hierarchical edge bundling using Holten's algorithm. For each
// input link, a path is computed that travels through the tree, up the parent
// hierarchy to the least common ancestor, and then back down to the destination
// node. Each path is simply an array of nodes.
Severity: Major
Found in zktest/src/main/webapp/js/d3.layout.js - About 4 days to fix

    Function force has 234 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    d3.layout.force = function() {
      var force = {},
          event = d3.dispatch("tick"),
          size = [1, 1],
          drag,
    Severity: Major
    Found in zktest/src/main/webapp/js/d3.layout.js - About 1 day to fix

      Function treemap has 178 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      d3.layout.treemap = function() {
        var hierarchy = d3.layout.hierarchy(),
            round = Math.round,
            size = [1, 1], // width, height
            padding = null,
      Severity: Major
      Found in zktest/src/main/webapp/js/d3.layout.js - About 7 hrs to fix

        Function tree has 122 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        d3.layout.tree = function() {
          var hierarchy = d3.layout.hierarchy().sort(null).value(null),
              separation = d3_layout_treeSeparation,
              size = [1, 1]; // width, height
        
        
        Severity: Major
        Found in zktest/src/main/webapp/js/d3.layout.js - About 4 hrs to fix

          Function chord has 120 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          d3.layout.chord = function() {
            var chord = {},
                chords,
                groups,
                matrix,
          Severity: Major
          Found in zktest/src/main/webapp/js/d3.layout.js - About 4 hrs to fix

            Function tree has 106 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function tree(d, i) {
                var nodes = hierarchy.call(this, d, i),
                    root = nodes[0];
            
                function firstWalk(node, previousSibling) {
            Severity: Major
            Found in zktest/src/main/webapp/js/d3.layout.js - About 4 hrs to fix

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

              function d3_layout_packCircle(nodes) {
                var xMin = Infinity,
                    xMax = -Infinity,
                    yMin = Infinity,
                    yMax = -Infinity,
              Severity: Major
              Found in zktest/src/main/webapp/js/d3.layout.js - About 3 hrs to fix

                Function hierarchy has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                d3.layout.hierarchy = function() {
                  var sort = d3_layout_hierarchySort,
                      children = d3_layout_hierarchyChildren,
                      value = d3_layout_hierarchyValue;
                
                
                Severity: Major
                Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                  Function relayout has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function relayout() {
                      var subgroups = {},
                          groupSums = [],
                          groupIndex = d3.range(n),
                          subgroupIndex = [],
                  Severity: Major
                  Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                    Function start has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      force.start = function() {
                        var i,
                            j,
                            n = nodes.length,
                            m = links.length,
                    Severity: Major
                    Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                      Function stack has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      d3.layout.stack = function() {
                        var values = Object,
                            order = d3_layout_stackOrders["default"],
                            offset = d3_layout_stackOffsets["zero"],
                            out = d3_layout_stackOut,
                      Severity: Major
                      Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                        Function tick has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function tick() {
                            var n = nodes.length,
                                m = links.length,
                                q,
                                i, // current index
                        Severity: Major
                        Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                          Function histogram has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          d3.layout.histogram = function() {
                            var frequency = true,
                                valuer = Number,
                                ranger = d3_layout_histogramRange,
                                binner = d3_layout_histogramBinSturges;
                          Severity: Major
                          Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                            Function pie has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            d3.layout.pie = function() {
                              var value = Number,
                                  sort = null,
                                  startAngle = 0,
                                  endAngle = 2 * Math.PI;
                            Severity: Minor
                            Found in zktest/src/main/webapp/js/d3.layout.js - About 2 hrs to fix

                              Function cluster has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              d3.layout.cluster = function() {
                                var hierarchy = d3.layout.hierarchy().sort(null).value(null),
                                    separation = d3_layout_treeSeparation,
                                    size = [1, 1]; // width, height
                              
                              
                              Severity: Minor
                              Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                Function partition has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                d3.layout.partition = function() {
                                  var hierarchy = d3.layout.hierarchy(),
                                      size = [1, 1]; // width, height
                                
                                  function position(node, x, dx, dy) {
                                Severity: Minor
                                Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                  Function apportion has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function apportion(node, previousSibling, ancestor) {
                                        if (previousSibling) {
                                          var vip = node,
                                              vop = node,
                                              vim = previousSibling,
                                  Severity: Minor
                                  Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                    Function position has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function position(row, u, rect, flush) {
                                        var i = -1,
                                            n = row.length,
                                            x = rect.x,
                                            y = rect.y,
                                    Severity: Minor
                                    Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                      Function squarify has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function squarify(node) {
                                          var children = node.children;
                                          if (children && children.length) {
                                            var rect = pad(node),
                                                row = [],
                                      Severity: Minor
                                      Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                        Function d3_layout_forceAccumulate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function d3_layout_forceAccumulate(quad, alpha, charges) {
                                          var cx = 0,
                                              cy = 0;
                                          quad.charge = 0;
                                          if (!quad.leaf) {
                                        Severity: Minor
                                        Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                          Function firstWalk has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              function firstWalk(node, previousSibling) {
                                                var children = node.children,
                                                    layout = node._tree;
                                                if (children && (n = children.length)) {
                                                  var n,
                                          Severity: Minor
                                          Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                            Function wiggle has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                              "wiggle": function(data) {
                                                var n = data.length,
                                                    x = data[0],
                                                    m = x.length,
                                                    max = 0,
                                            Severity: Minor
                                            Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                              Function cluster has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                function cluster(d, i) {
                                                  var nodes = hierarchy.call(this, d, i),
                                                      root = nodes[0],
                                                      previousNode,
                                                      x = 0,
                                              Severity: Minor
                                              Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                          for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
                                                            if (d3_layout_packIntersects(k, c)) {
                                                              if (s2 < s1) {
                                                                isect = -1;
                                                                j = k;
                                                Severity: Major
                                                Found in zktest/src/main/webapp/js/d3.layout.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                            if (d3_layout_packIntersects(j, c)) {
                                                              isect = 1;
                                                              break;
                                                            }
                                                  Severity: Major
                                                  Found in zktest/src/main/webapp/js/d3.layout.js - About 45 mins to fix

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

                                                        } else { // vertical subdivision
                                                          if (flush || v > rect.dx) v = v ? rect.dx : 0; // over+underflow
                                                          while (++i < n) {
                                                            o = row[i];
                                                            o.x = x;
                                                    Severity: Major
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 1 day to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1784..1797

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

                                                    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 (u == rect.dx) { // horizontal subdivision
                                                          if (flush || v > rect.dy) v = v ? rect.dy : 0; // over+underflow
                                                          while (++i < n) {
                                                            o = row[i];
                                                            o.x = x;
                                                    Severity: Major
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 1 day to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1797..1810

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

                                                    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

                                                      stack.order = function(x) {
                                                        if (!arguments.length) return order;
                                                        order = typeof x === "function" ? x : d3_layout_stackOrders[x];
                                                        return stack;
                                                      };
                                                    Severity: Major
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 1 hr to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 755..759

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

                                                    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

                                                      stack.offset = function(x) {
                                                        if (!arguments.length) return offset;
                                                        offset = typeof x === "function" ? x : d3_layout_stackOffsets[x];
                                                        return stack;
                                                      };
                                                    Severity: Major
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 1 hr to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 749..753

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

                                                    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 dx = b.x - a.x,
                                                          dy = b.y - a.y,
                                                          dr = a.r + b.r;
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 55 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1341..1343

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

                                                    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 db = a.r + c.r,
                                                          dx = b.x - a.x,
                                                          dy = b.y - a.y;
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 55 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1204..1206

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

                                                    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

                                                      chord.padding = function(x) {
                                                        if (!arguments.length) return padding;
                                                        padding = x;
                                                        chords = groups = null;
                                                        return chord;
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 50 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 174..179

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

                                                    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

                                                      chord.sortGroups = function(x) {
                                                        if (!arguments.length) return sortGroups;
                                                        sortGroups = x;
                                                        chords = groups = null;
                                                        return chord;
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 50 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 167..172

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

                                                    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

                                                      force.linkDistance = function(x) {
                                                        if (!arguments.length) return linkDistance;
                                                        linkDistance = d3.functor(x);
                                                        return force;
                                                      };
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 45 mins to fix
                                                    zktest/src/main/webapp/js/d3.js on lines 3549..3553

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

                                                    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

                                                      var hierarchy = d3.layout.hierarchy().sort(null).value(null),
                                                          separation = d3_layout_treeSeparation,
                                                          size = [1, 1]; // width, height
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 40 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1360..1362

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

                                                    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

                                                      var hierarchy = d3.layout.hierarchy().sort(null).value(null),
                                                          separation = d3_layout_treeSeparation,
                                                          size = [1, 1]; // width, height
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 40 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1438..1440

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

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

                                                      force.linkStrength = function(x) {
                                                        if (!arguments.length) return linkStrength;
                                                        linkStrength = d3.functor(x);
                                                        return force;
                                                      };
                                                    Severity: Major
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 11 other locations - About 40 mins to fix
                                                    zktest/src/main/webapp/js/d3.js on lines 2754..2758
                                                    zktest/src/main/webapp/js/d3.js on lines 2760..2764
                                                    zktest/src/main/webapp/js/d3.js on lines 2766..2770
                                                    zktest/src/main/webapp/js/d3.js on lines 2772..2776
                                                    zktest/src/main/webapp/js/d3.js on lines 3390..3394
                                                    zktest/src/main/webapp/js/d3.js on lines 3396..3400
                                                    zktest/src/main/webapp/js/d3.js on lines 3402..3406
                                                    zktest/src/main/webapp/js/d3.js on lines 3408..3412
                                                    zktest/src/main/webapp/js/d3.js on lines 3414..3418
                                                    zktest/src/main/webapp/js/d3.js on lines 3456..3460
                                                    zktest/src/main/webapp/js/d3.js on lines 3462..3466

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

                                                    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

                                                      chord.sortSubgroups = function(x) {
                                                        if (!arguments.length) return sortSubgroups;
                                                        sortSubgroups = x;
                                                        chords = null;
                                                        return chord;
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 35 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 1861..1866

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

                                                    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

                                                      treemap.sticky = function(x) {
                                                        if (!arguments.length) return sticky;
                                                        sticky = x;
                                                        stickies = null;
                                                        return treemap;
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 35 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 181..186

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

                                                    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

                                                          subgroupIndex.forEach(function(d, i) {
                                                            d.sort(function(a, b) {
                                                              return sortSubgroups(matrix[i][a], matrix[i][b]);
                                                            });
                                                          });
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 35 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 154..158

                                                    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

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

                                                      function resort() {
                                                        chords.sort(function(a, b) {
                                                          return sortChords(a.target.value, b.target.value);
                                                        });
                                                      }
                                                    Severity: Minor
                                                    Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 35 mins to fix
                                                    zktest/src/main/webapp/js/d3.layout.js on lines 103..107

                                                    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