awslabs / synchro-charts
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
  • 26% duplication:
    • 19,284 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,050 duplicated lines
  • 1,331 duplicates
system26% (5,050 lines)
Duplication per Extension
tsx36% (4,432 lines)
ts10% (572 lines)
css3% (32 lines)
js2% (8 lines)
jsx<1% (6 lines)
Duplication per Component (primary)
packages/synchro-charts/src/testing54% (3,145 lines)
packages/synchro-charts/src/components15% (1,849 lines)
packages/synchro-charts-react/src/react-component-lib16% (34 lines)
packages/doc-site/src/components1% (14 lines)
packages/synchro-charts/src/utils2% (8 lines)
packages/doc-site/src0% (0 lines)
packages/doc-site/src/styleguide0% (0 lines)
packages/doc-site0% (0 lines)
packages/synchro-charts/cypress/plugins0% (0 lines)
packages/synchro-charts/cypress0% (0 lines)
packages/synchro-charts/cypress/integration0% (0 lines)
packages/synchro-charts/cypress/support0% (0 lines)
packages/synchro-charts/configuration/jest0% (0 lines)
packages/synchro-charts/src0% (0 lines)
packages/synchro-charts/src/globals0% (0 lines)
packages/synchro-charts/src/scripts0% (0 lines)
packages/synchro-charts0% (0 lines)
packages/synchro-charts-react/src0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G packages/synchro-charts/src/components packages/synchro-charts/src/components packages/synchro-charts/src/testing packages/synchro-charts/src/testing packages/synchro-charts/src/components--packages/synchro-charts/src/testing 134

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 1,331 duplicates...
Size#FoldersFilesLinesCode
36 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-threshold-multiple...
status-timeline-threshold-multiple-th...
29:66 (70%)
22:59 (72%)
view
32 x 2 packages/synchro-charts/...ting/test-routes/charts
packages/synchro-charts/...ting/test-routes/charts
sc-webgl-chart-threshold-coloration-m...
sc-webgl-chart-threshold-coloration-m...
37:71 (48%)
37:71 (42%)
view
30 x 2 packages/synchro-charts/...ting/test-routes/charts
packages/synchro-charts/...ting/test-routes/charts
sc-webgl-chart-threshold-coloration-b...
sc-webgl-chart-threshold-coloration-m...
37:70 (38%)
37:69 (45%)
view
30 x 2 packages/synchro-charts/...ting/test-routes/charts
packages/synchro-charts/...ting/test-routes/charts
sc-webgl-chart-threshold-coloration-b...
sc-webgl-chart-threshold-coloration-m...
37:70 (38%)
37:69 (39%)
view
29 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-threshold-colorati...
status-timeline-threshold-coloration.tsx
28:57 (67%)
23:52 (65%)
view
29 x 2 packages/synchro-charts/...rts/sc-webgl-base-chart
packages/synchro-charts/...sting/chartDescriptions
sc-webgl-base-chart.spec.tsx
describeLegend.tsx
115:148 (4%)
10:43 (49%)
view
29 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-threshold-exact-po...
status-timeline-threshold-exact-point...
26:55 (67%)
23:52 (65%)
view
29 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-threshold-no-color...
status-timeline-threshold-no-colorati...
30:59 (64%)
23:52 (65%)
view
28 x 2 packages/synchro-charts/.../charts/status-timeline
packages/synchro-charts/.../charts/status-timeline
status-timeline-threshold-coloration.tsx
status-timeline-threshold-no-colorati...
11:40 (63%)
11:40 (63%)
view
28 x 2 packages/synchro-charts/...ts/charts/sc-line-chart
packages/synchro-charts/...charts/sc-scatter-chart
sc-line-chart.tsx
sc-scatter-chart.tsx
43:74 (34%)
43:74 (34%)
view
27 x 2 packages/synchro-charts/...nts/charts/sc-bar-chart
packages/synchro-charts/...charts/sc-scatter-chart
sc-bar-chart.tsx
sc-scatter-chart.tsx
42:72 (32%)
41:71 (33%)
view
27 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/...arts/sc-webgl-bar-chart
sc-webgl-bar-chart-threshold-band.tsx
sc-webgl-bar-chart-threshold-multiple...
16:44 (50%)
17:45 (52%)
view
27 x 2 packages/synchro-charts/.../sc-webgl-scatter-chart
packages/synchro-charts/.../sc-webgl-scatter-chart
sc-scatter-chart-threshold-coloration...
sc-scatter-chart-threshold-no-colorat...
27:55 (51%)
29:57 (50%)
view
26 x 2 packages/synchro-charts/.../charts/status-timeline
packages/synchro-charts/.../charts/status-timeline
status-timeline-threshold-coloration.tsx
status-timeline-threshold-multiple-th...
11:38 (59%)
11:38 (52%)
view
26 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-fast-viewport.tsx
status-timeline-fast-viewport.tsx
29:58 (36%)
25:54 (38%)
view
26 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-dynamic-data.tsx
status-timeline-dynamic-data.tsx
24:53 (41%)
18:47 (41%)
view
26 x 2 packages/synchro-charts/.../charts/status-timeline
packages/synchro-charts/.../charts/status-timeline
status-timeline-threshold-multiple-th...
status-timeline-threshold-no-colorati...
11:38 (52%)
11:38 (59%)
view
26 x 2 packages/synchro-charts/...arts/sc-webgl-bar-chart
packages/synchro-charts/.../charts/status-timeline
sc-webgl-bar-chart-threshold-multiple...
status-timeline-threshold-multiple-da...
67:93 (35%)
60:86 (37%)
view
25 x 2 packages/synchro-charts/.../sc-webgl-scatter-chart
packages/synchro-charts/.../sc-webgl-scatter-chart
sc-scatter-chart-threshold-coloration...
sc-scatter-chart-threshold-coloration...
9:40 (29%)
9:40 (30%)
view
25 x 2 packages/synchro-charts/...nts/charts/sc-bar-chart
packages/synchro-charts/...ts/charts/sc-line-chart
sc-bar-chart.tsx
sc-line-chart.tsx
44:72 (30%)
43:71 (30%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
31 x 2 packages/synchro-charts/...t-routes/charts/shaders
packages/synchro-charts/...t-routes/charts/shaders
sc-straight-line-segment-colored.tsx
sc-straight-line-segment.tsx
36:70 
32:65 
view
11 x 2 packages/synchro-charts-...src/react-component-lib
packages/synchro-charts-...src/react-component-lib
createControllerComponent.tsx
createOverlayComponent.tsx
41:52 
43:54 
view
9 x 2 packages/synchro-charts/...mponents/sc-widget-grid
packages/synchro-charts/src/components/sc-table
sc-widget-grid.tsx
sc-table.tsx
76:85 
55:64 
view
7 x 2 packages/synchro-charts/...mponents/sc-widget-grid
packages/synchro-charts/src/components/sc-table
sc-widget-grid.tsx
sc-table.tsx
88:95 
39:46 
view