microsoft / PowerBI-visuals-sampleBarChart-react
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
  • 12% duplication:
    • 949 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 114 duplicated lines
  • 5 duplicates
system12% (114 lines)
Duplication per Extension
tsx17% (114 lines)
Duplication per Component (primary)
src/components/BarChart25% (74 lines)
src/components/RechartsBarChart24% (40 lines)
ROOT0% (0 lines)
src/components0% (0 lines)
src0% (0 lines)
style0% (0 lines)

Duplication Between Components (50+ lines)

G src/components/BarChart src/components/BarChart src/components/RechartsBarChart src/components/RechartsBarChart src/components/BarChart--src/components/RechartsBarChart 80

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
21 x 2 src/components/BarChart
src/components/RechartsBarChart
index.tsx
index.tsx
78:104 (17%)
89:115 (12%)
view
12 x 2 src/components/BarChart
src/components/RechartsBarChart
index.tsx
index.tsx
40:54 (10%)
41:55 (7%)
view
9 x 2 src/components/BarChart
src/components/BarChart
Bars.tsx
Bars.tsx
92:100 (11%)
112:120 (11%)
view
8 x 2 src/components/BarChart
src/components/BarChart
Grid.tsx
Ticks.tsx
31:40 (25%)
29:38 (28%)
view
7 x 2 src/components/BarChart
src/components/RechartsBarChart
index.tsx
index.tsx
60:66 (5%)
62:68 (4%)
view