microsoft / MXDial-IoT-Sample
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
  • 7% duplication:
    • 2,795 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 216 duplicated lines
  • 16 duplicates
system7% (216 lines)
Duplication per Extension
js8% (164 lines)
css37% (40 lines)
cs2% (12 lines)
Duplication per Component (primary)
frontend/mx/src5% (98 lines)
frontend/common/components29% (66 lines)
frontend/common/styles37% (40 lines)
backend/MXApi/Models14% (12 lines)
backend/MXApi/Config0% (0 lines)
backend/MXApi0% (0 lines)
backend/MXApi/Controllers0% (0 lines)
backend/MXApi/Filters0% (0 lines)
backend/MXApi/Helpers0% (0 lines)
backend/MXApi/Jobs0% (0 lines)
backend/MXApi/Properties0% (0 lines)
backend/MXApi/Resolvers0% (0 lines)
backend/MXApi/Services0% (0 lines)
backend/MXApi/SigR0% (0 lines)
frontend/common/containers0% (0 lines)
frontend/common/icons0% (0 lines)
frontend/mx/public0% (0 lines)
mxdevice/Device0% (0 lines)

Duplication Between Components (50+ lines)

G frontend/common/components frontend/common/components frontend/mx/src frontend/mx/src frontend/common/components--frontend/mx/src 132

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
30 x 2 frontend/common/components
frontend/mx/src/components
round-gauge.js
round-gauge.js
4:42 (36%)
4:42 (31%)
view
25 x 2 frontend/common/components
frontend/mx/src/components
round-gauge.js
round-gauge.js
61:86 (30%)
64:89 (26%)
view
11 x 2 frontend/common/components
frontend/mx/src/components
round-gauge.js
round-gauge.js
44:60 (13%)
45:61 (11%)
view
10 x 2 frontend/mx/src/components
frontend/mx/src/components
dashboard-gauge.js
temperature-monitor.js
45:55 (10%)
19:29 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
18:25 (12%)
60:67 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
4:11 (12%)
60:67 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
32:39 (12%)
60:67 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
4:11 (12%)
46:53 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
46:53 (12%)
60:67 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
4:11 (12%)
32:39 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
18:25 (12%)
32:39 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
18:25 (12%)
46:53 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
4:11 (12%)
18:25 (12%)
view
8 x 2 frontend/common/styles
frontend/common/styles
fonts.css
fonts.css
32:39 (12%)
46:53 (12%)
view
6 x 2 frontend/mx/src/components
frontend/mx/src/components
atmospheric-pressure-gauge.js
humidity-level-gauge.js
31:36 (20%)
20:25 (30%)
view
6 x 2 backend/MXApi/Models
backend/MXApi/Models
MetricsPayload.cs
MxPayload.cs
13:20 (37%)
13:20 (23%)
view