microsoft / chart-parts
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 13% duplication:
    • 14,185 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,950 duplicated lines
  • 451 duplicates
system13% (1,950 lines)
Duplication per Extension
tsx23% (1,377 lines)
ts7% (558 lines)
js2% (15 lines)
Duplication per Component (primary)
packages/charts43% (727 lines)
packages/docs-site17% (499 lines)
packages/docs-examples14% (341 lines)
packages/api-react12% (126 lines)
packages/util-shapes10% (66 lines)
packages/util-scales6% (43 lines)
packages/api-builder2% (38 lines)
packages/processing-vsvg6% (38 lines)
packages/api-interfaces3% (18 lines)
packages/docs-examples-mobile3% (15 lines)
packages/renderer-react-native-svg13% (14 lines)
packages/renderer-react-svg18% (14 lines)
packages/docs-examples-web15% (11 lines)
ROOT0% (0 lines)
packages/docs-testdata0% (0 lines)
packages/processing-orchestrator0% (0 lines)
packages/processing-scenegraph0% (0 lines)
packages/util-transform0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 451 duplicates...
Size#FoldersFilesLinesCode
31 x 2 packages/docs-examples/src/renderless/BarChart
packages/docs-examples/s...erless/BarChartWithMean
BarChart.tsx
BarChartWithMean.tsx
94:126 (25%)
57:89 (40%)
view
29 x 2 packages/docs-examples/s...erless/StackedAreaChart
packages/docs-examples/s...derless/StackedBarChart
StackedAreaChart.tsx
StackedBarChart.tsx
15:47 (42%)
12:44 (32%)
view
22 x 2 packages/charts/stories/components
packages/charts/stories/components
LineChartTester.tsx
ScatterPlotTester.tsx
12:33 (40%)
11:32 (40%)
view
17 x 2 packages/charts/stories/components
packages/charts/stories/components
GroupedBarChartTester.tsx
RotateBarChartTester.tsx
38:56 (33%)
35:54 (36%)
view
17 x 2 packages/docs-site/src/pages
packages/docs-site/src/templates
documentation.tsx
docTemplate.tsx
17:41 (77%)
50:74 (35%)
view
17 x 2 packages/charts/stories/components
packages/charts/stories/components
GroupedBarChartTester.tsx
StackedBarChartTester.tsx
9:26 (33%)
9:26 (31%)
view
16 x 2 packages/charts/stories/components
packages/charts/stories/components
GroupedBarChartTester.tsx
StackedBarChartTester.tsx
29:45 (31%)
29:45 (29%)
view
16 x 2 packages/charts/src/AreaChart/variants
packages/charts/src/LineChart
StackedAreaChart.tsx
LineChart.tsx
25:40 (21%)
29:44 (23%)
view
16 x 2 packages/charts/src/AreaChart/variants
packages/charts/src/ScatterPlot
StackedAreaChart.tsx
ScatterPlot.tsx
25:40 (21%)
23:38 (27%)
view
16 x 2 packages/docs-site/src/components/mark-testers
packages/docs-site/src/components/mark-testers
symbol-tester-area.tsx
symbol-tester-width.tsx
36:52 (41%)
36:52 (41%)
view
16 x 2 packages/charts/stories/components
packages/charts/stories/components
InteractiveBarChartTester.tsx
RotateBarChartTester.tsx
44:62 (26%)
35:53 (34%)
view
16 x 2 packages/charts/stories/components
packages/charts/stories/components
GroupedBarChartTester.tsx
InteractiveBarChartTester.tsx
38:55 (31%)
44:62 (26%)
view
16 x 2 packages/charts/src/LineChart
packages/charts/src/ScatterPlot
LineChart.tsx
ScatterPlot.tsx
29:44 (23%)
23:38 (27%)
view
16 x 2 packages/docs-site/src/components/mark-testers
packages/docs-site/src/components/mark-testers
area-tester-horizontal.tsx
line-tester.tsx
64:81 (22%)
55:72 (26%)
view
15 x 2 packages/charts/src/BarChart/variants
packages/charts/src/BarChart/variants
GroupedBarChart.tsx
StackedBarChart.tsx
30:44 (8%)
26:40 (11%)
view
15 x 2 packages/docs-site/src/components/mark-testers
packages/docs-site/src/components/mark-testers
area-tester-vertical.tsx
line-tester.tsx
27:42 (20%)
57:72 (24%)
view
15 x 2 packages/docs-site/src/components/mark-testers
packages/docs-site/src/components/mark-testers
area-tester-horizontal.tsx
area-tester-vertical.tsx
66:81 (21%)
27:42 (20%)
view
14 x 2 packages/charts/src/LineChart
packages/charts/src/ScatterPlot
LineChart.tsx
ScatterPlot.tsx
61:74 (20%)
56:69 (24%)
view
14 x 2 packages/docs-examples/src/builder
packages/docs-examples/s...derless/GroupedBarChart
GroupedBarChartBuilder.tsx
GroupedBarChart.tsx
24:37 (14%)
22:35 (16%)
view
14 x 2 packages/charts/stories/components
packages/charts/stories/components
GroupedBarChartTester.tsx
StackedBarChartTester.tsx
47:60 (27%)
48:61 (25%)
view