microsoft / vscode-arduino
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
  • 4% duplication:
    • 6,470 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 300 duplicated lines
  • 16 duplicates
system4% (300 lines)
Duplication per Extension
ts4% (224 lines)
tsx5% (38 lines)
js16% (24 lines)
css3% (14 lines)
Duplication per Component (primary)
src/views5% (112 lines)
src/common15% (80 lines)
src/arduino1% (32 lines)
src3% (30 lines)
ROOT8% (24 lines)
src/serialmonitor4% (22 lines)
build0% (0 lines)
snippets0% (0 lines)
src/debug0% (0 lines)
src/langService0% (0 lines)
src/logger0% (0 lines)

Duplication Between Components (50+ lines)

G src/common src/common src/views src/views src/common--src/views 120

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 16 longest duplicates.
See data for all 16 duplicates...
Size#FoldersFilesLinesCode
60 x 2 src/common
src/views/app/actions
cycle.ts
cycle.ts
26:167 (100%)
25:166 (100%)
view
12 x 2 ROOT
ROOT
gulpfile.js
gulpfile.js
33:46 (8%)
51:64 (8%)
view
11 x 2 src/serialmonitor
src/serialmonitor
serialportctrl.ts
serialportctrl.ts
181:193 (8%)
199:211 (8%)
view
10 x 2 src/common/sys
src/common/sys
darwin.ts
linux.ts
25:38 (50%)
27:40 (47%)
view
7 x 2 src/views/app/styles
src/views/app/styles
react-select.css
react-select.css
218:224 (1%)
226:232 (1%)
view
7 x 2 src/views/app/components
src/views/app/components
BoardItemView.tsx
LibraryItemView.tsx
37:47 (6%)
54:64 (6%)
view
7 x 2 src/arduino
src/arduino
arduino.ts
arduino.ts
596:603 (1%)
618:625 (1%)
view
6 x 2 src/arduino
src/arduino
arduinoSettings.ts
arduinoSettings.ts
68:74 (3%)
212:218 (3%)
view
6 x 2 src
src
extension.ts
extension.ts
126:131 (1%)
404:409 (1%)
view
6 x 2 src/views/app/components
src/views/app/components
BoardManager.tsx
LibraryManager.tsx
73:78 (5%)
87:92 (4%)
view
6 x 2 src
src
extension.ts
extension.ts
247:252 (1%)
404:409 (1%)
view
6 x 2 src/views/app/components
src/views/app/components
BoardManager.tsx
LibraryManager.tsx
116:122 (5%)
148:154 (4%)
view
6 x 2 src
src
extension.ts
extension.ts
126:131 (1%)
247:252 (1%)
view
6 x 2 src/arduino
src/arduino
arduinoSettings.ts
arduinoSettings.ts
88:94 (3%)
212:218 (3%)
view
6 x 2 src/arduino
src/arduino
arduinoSettings.ts
arduinoSettings.ts
68:74 (3%)
88:94 (3%)
view
6 x 2 src
src
extension.ts
extension.ts
330:336 (1%)
343:349 (1%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
40 x 2 src/common
src/views/app/actions
cycle.ts
cycle.ts
26:116 
25:115 
view
12 x 2 src/common/sys
src/common/sys
darwin.ts
linux.ts
25:39 
27:41 
view
6 x 2 src/arduino
src/arduino
arduinoSettings.ts
arduinoSettings.ts
108:114 
120:126 
view