microsoft / PowerShell-DSC-for-Linux
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
  • 53% duplication:
    • 193,715 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 103,526 duplicated lines
  • 70,397 duplicates
system53% (103,526 lines)
Duplication per Extension
py88% (43,873 lines)
c42% (36,576 lines)
h44% (15,260 lines)
cpp38% (2,830 lines)
in100% (2,156 lines)
rb24% (1,691 lines)
psd178% (378 lines)
y23% (300 lines)
cmake100% (298 lines)
hpp12% (81 lines)
cs6% (67 lines)
reg12% (16 lines)
Duplication per Component (primary)
Providers58% (80,513 lines)
LCM35% (18,217 lines)
ext99% (4,796 lines)

Duplication Between Components (50+ lines)

G LCM LCM Providers Providers LCM--Providers 32767

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 70,397 duplicates...
Size#FoldersFilesLinesCode
1126 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
368:1680 (80%)
384:1696 (80%)
view
745 x 2 Providers/nxIPAddress
Providers/nxLog
29:987 (45%)
29:987 (53%)
view
745 x 2 Providers/nxFile
Providers/nxFileLine
36:994 (41%)
29:987 (51%)
view
745 x 2 Providers/nxMySqlDatabase
Providers/nxMySqlGrant
29:987 (50%)
29:987 (46%)
view
745 x 2 Providers/nxFile
Providers/nxMySqlGrant
36:994 (41%)
29:987 (46%)
view
745 x 2 Providers/nxArchive
Providers/nxDNSServerAddress
29:987 (48%)
29:987 (50%)
view
745 x 2 Providers/nxEnvironment
Providers/nxScript
29:987 (50%)
36:994 (49%)
view
745 x 2 Providers/nxFile
Providers/nxLog
36:994 (41%)
29:987 (53%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxMySqlDatabase
29:987 (50%)
29:987 (50%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxMySqlGrant
29:987 (50%)
29:987 (46%)
view
745 x 2 Providers/nxComputer
Providers/nxDNSServerAddress
29:987 (51%)
29:987 (50%)
view
745 x 2 Providers/nxFile
Providers/nxIPAddress
36:994 (41%)
29:987 (45%)
view
745 x 2 Providers/nxComputer
Providers/nxMySqlDatabase
29:987 (51%)
29:987 (50%)
view
745 x 2 Providers/nxArchive
Providers/nxScript
29:987 (48%)
36:994 (49%)
view
745 x 2 Providers/nxOMSKeyMgmt
Providers/nxScript
21:979 (50%)
36:994 (49%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxLog
29:987 (50%)
29:987 (53%)
view
745 x 2 Providers/nxComputer
Providers/nxSshAuthorizedKeys
29:987 (51%)
29:987 (50%)
view
745 x 2 Providers/nxArchive
Providers/nxEnvironment
29:987 (48%)
29:987 (50%)
view
745 x 2 Providers/nxArchive
Providers/nxFirewall
29:987 (48%)
29:987 (37%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxFirewall
29:987 (50%)
29:987 (37%)
view
745 x 2 Providers/nxEnvironment
Providers/nxSshAuthorizedKeys
29:987 (50%)
29:987 (50%)
view
745 x 2 Providers/nxFirewall
Providers/nxSshAuthorizedKeys
29:987 (37%)
29:987 (50%)
view
745 x 2 Providers/nxEnvironment
Providers/nxMySqlGrant
29:987 (50%)
29:987 (46%)
view
745 x 2 Providers/nxFile
Providers/nxScript
36:994 (41%)
36:994 (49%)
view
745 x 2 Providers/nxFileLine
Providers/nxFirewall
29:987 (51%)
29:987 (37%)
view
745 x 2 Providers/nxFileLine
Providers/nxMySqlGrant
29:987 (51%)
29:987 (46%)
view
745 x 2 Providers/nxFile
Providers/nxMySqlDatabase
36:994 (41%)
29:987 (50%)
view
745 x 2 Providers/nxIPAddress
Providers/nxOMSKeyMgmt
29:987 (45%)
21:979 (50%)
view
745 x 2 Providers/nxFirewall
Providers/nxMySqlDatabase
29:987 (37%)
29:987 (50%)
view
745 x 2 Providers/nxComputer
Providers/nxFile
29:987 (51%)
36:994 (41%)
view
745 x 2 Providers/nxMySqlGrant
Providers/nxScript
29:987 (46%)
36:994 (49%)
view
745 x 2 Providers/nxArchive
Providers/nxOMSKeyMgmt
29:987 (48%)
21:979 (50%)
view
745 x 2 Providers/nxMySqlUser
Providers/nxOMSKeyMgmt
29:987 (49%)
21:979 (50%)
view
745 x 2 Providers/nxLog
Providers/nxScript
29:987 (53%)
36:994 (49%)
view
745 x 2 Providers/nxFirewall
Providers/nxMySqlUser
29:987 (37%)
29:987 (49%)
view
745 x 2 Providers/nxMySqlDatabase
Providers/nxMySqlUser
29:987 (50%)
29:987 (49%)
view
745 x 2 Providers/nxFirewall
Providers/nxOMSKeyMgmt
29:987 (37%)
21:979 (50%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxSshAuthorizedKeys
29:987 (50%)
29:987 (50%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxFileLine
29:987 (50%)
29:987 (51%)
view
745 x 2 Providers/nxLog
Providers/nxMySqlUser
29:987 (53%)
29:987 (49%)
view
745 x 2 Providers/nxEnvironment
Providers/nxMySqlUser
29:987 (50%)
29:987 (49%)
view
745 x 2 Providers/nxArchive
Providers/nxLog
29:987 (48%)
29:987 (53%)
view
745 x 2 Providers/nxArchive
Providers/nxFileLine
29:987 (48%)
29:987 (51%)
view
745 x 2 Providers/nxFirewall
Providers/nxLog
29:987 (37%)
29:987 (53%)
view
745 x 2 Providers/nxMySqlGrant
Providers/nxSshAuthorizedKeys
29:987 (46%)
29:987 (50%)
view
745 x 2 Providers/nxFileLine
Providers/nxMySqlDatabase
29:987 (51%)
29:987 (50%)
view
745 x 2 Providers/nxArchive
Providers/nxComputer
29:987 (48%)
29:987 (51%)
view
745 x 2 Providers/nxComputer
Providers/nxScript
29:987 (51%)
36:994 (49%)
view
745 x 2 Providers/nxComputer
Providers/nxMySqlUser
29:987 (51%)
29:987 (49%)
view
745 x 2 Providers/nxDNSServerAddress
Providers/nxMySqlUser
29:987 (50%)
29:987 (49%)
view
Duplicated Units
The list of top 50 duplicated units.
See data for all 736 unit duplicates...
Size#FoldersFilesLinesCode
206 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
177 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
121 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
99 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
100 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
92 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
92 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
0:0 
0:0 
view
90 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
110 x 2 LCM/scripts
LCM/scripts/python3
0:0 
0:0 
view
104 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
96 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
84 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
88 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
view
79 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
view
81 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
83 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
67 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
67 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
view
71 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
60 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
65 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
63 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
63 x 4 Providers/Scripts/3.x/Scripts
Providers/Scripts/3.x/Scripts
Providers/Scripts/3.x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
0:0 
view
62 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
62 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
0:0 
0:0 
view
82 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
61 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
81 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
52 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
55 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
58 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
51 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
59 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
52 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
51 x 3 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
55 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
56 x 7 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
55 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
0:0 
0:0 
view
56 x 7 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
58 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
view
52 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
50 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
55 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
51 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view
45 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
54 x 2 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
0:0 
0:0 
view
47 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
view
45 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
0:0 
0:0 
view
54 x 2 Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/2.4x-2.5x/Scripts
0:0 
0:0 
view
66 x 3 Providers/Scripts/2.4x-2.5x/Scripts
Providers/Scripts/2.6x-2.7x/Scripts
Providers/Scripts/3.x/Scripts
0:0 
0:0 
0:0 
view