Code Duplication    Length = 7-11 lines in 2 locations

doc/phpmetrics/js/d3.v3.js 2 locations

@@ 4066-4076 (lines=11) @@
4063
      d3_geo_pathCentroid.point = nextPoint;
4064
      d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);
4065
    };
4066
    function nextPoint(x, y) {
4067
      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
4068
      d3_geo_centroidX1 += z * (x0 + x) / 2;
4069
      d3_geo_centroidY1 += z * (y0 + y) / 2;
4070
      d3_geo_centroidZ1 += z;
4071
      z = y0 * x - x0 * y;
4072
      d3_geo_centroidX2 += z * (x0 + x);
4073
      d3_geo_centroidY2 += z * (y0 + y);
4074
      d3_geo_centroidZ2 += z * 3;
4075
      d3_geo_pathCentroidPoint(x0 = x, y0 = y);
4076
    }
4077
    d3_geo_pathCentroid.lineEnd = function() {
4078
      nextPoint(x00, y00);
4079
    };
@@ 4049-4055 (lines=7) @@
4046
      d3_geo_pathCentroid.point = nextPoint;
4047
      d3_geo_pathCentroidPoint(x0 = x, y0 = y);
4048
    };
4049
    function nextPoint(x, y) {
4050
      var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
4051
      d3_geo_centroidX1 += z * (x0 + x) / 2;
4052
      d3_geo_centroidY1 += z * (y0 + y) / 2;
4053
      d3_geo_centroidZ1 += z;
4054
      d3_geo_pathCentroidPoint(x0 = x, y0 = y);
4055
    }
4056
  }
4057
  function d3_geo_pathCentroidLineEnd() {
4058
    d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;