facebook / time
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:
    • 8,906 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 694 duplicated lines
  • 101 duplicates
system7% (694 lines)
Duplication per Extension
go7% (694 lines)
Duplication per Component (primary)
ptp/protocol10% (150 lines)
ntp/responder24% (104 lines)
cmd/ntpcheck5% (71 lines)
calnex/api13% (66 lines)
cmd/ptpcheck8% (54 lines)
timestamp26% (52 lines)
ptp/ptp4u5% (48 lines)
ptp/simpleclient10% (48 lines)
ntp/chrony6% (40 lines)
cmd/ziffy4% (31 lines)
cmd/ntpresponder12% (9 lines)
cmd/ptp4u12% (9 lines)
calnex/firmware13% (6 lines)
calnex/config6% (6 lines)
cmd/calnex0% (0 lines)
cmd/pshark0% (0 lines)
phc0% (0 lines)
ntp/shm0% (0 lines)
ntp/protocol0% (0 lines)
ntp/control0% (0 lines)
calnex/cmd0% (0 lines)
calnex/cert0% (0 lines)
calnex/export0% (0 lines)
leapsectz0% (0 lines)
leaphash0% (0 lines)
oscillatord0% (0 lines)

Duplication Between Components (50+ lines)

G cmd/ntpcheck cmd/ntpcheck cmd/ptpcheck cmd/ptpcheck cmd/ntpcheck--cmd/ptpcheck 78

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 101 duplicates...
Size#FoldersFilesLinesCode
21 x 2 ptp/protocol
ptp/protocol
407:428 (5%)
450:471 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
321:342 (5%)
364:385 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
364:385 (5%)
493:514 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
321:342 (5%)
493:514 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
450:471 (5%)
493:514 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
321:342 (5%)
407:428 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
321:342 (5%)
450:471 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
364:385 (5%)
450:471 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
364:385 (5%)
407:428 (5%)
view
21 x 2 ptp/protocol
ptp/protocol
407:428 (5%)
493:514 (5%)
view
18 x 2 ntp/responder/server
ntp/responder/server
48:76 (54%)
49:77 (52%)
view
18 x 2 ptp/simpleclient
ptp/simpleclient
29:46 (25%)
63:80 (25%)
view
17 x 2 timestamp
timestamp
29:67 (100%)
29:67 (100%)
view
15 x 2 ptp/protocol
ptp/protocol
249:263 (6%)
280:294 (6%)
view
15 x 2 ptp/protocol
ptp/protocol
218:232 (6%)
280:294 (6%)
view
15 x 2 ptp/protocol
ptp/protocol
218:232 (6%)
249:263 (6%)
view
15 x 2 ntp/responder/server
ntp/responder/server
27:47 (45%)
27:47 (44%)
view
12 x 2 cmd/ziffy/node
ptp/simpleclient
41:52 (27%)
40:51 (16%)
view
10 x 2 cmd/ntpcheck/cmd
cmd/ptpcheck/cmd
215:228 (6%)
165:178 (8%)
view
10 x 2 ntp/responder/server
ntp/responder/server
42:55 (24%)
72:85 (24%)
view
9 x 2 cmd/ntpresponder
cmd/ptp4u
64:72 (12%)
63:71 (12%)
view
9 x 2 cmd/ntpresponder
cmd/ziffy
64:72 (12%)
111:119 (9%)
view
9 x 2 calnex/api
calnex/api
441:453 (1%)
487:499 (1%)
view
9 x 2 cmd/ptp4u
cmd/ziffy
63:71 (12%)
111:119 (9%)
view
8 x 2 ptp/protocol
ptp/protocol
256:263 (3%)
330:337 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
256:263 (3%)
502:509 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
225:232 (3%)
459:466 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
256:263 (3%)
373:380 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
225:232 (3%)
416:423 (2%)
view
8 x 2 cmd/ntpcheck/checker
cmd/ntpcheck/checker
94:103 (9%)
122:131 (9%)
view
8 x 2 ptp/protocol
ptp/protocol
225:232 (3%)
373:380 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
225:232 (3%)
330:337 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
225:232 (3%)
502:509 (2%)
view
8 x 2 ntp/responder/server
ntp/responder/server
50:62 (23%)
60:72 (19%)
view
8 x 2 ptp/protocol
ptp/protocol
287:294 (3%)
459:466 (2%)
view
8 x 2 ntp/responder/server
ntp/responder/server
49:61 (24%)
60:72 (19%)
view
8 x 2 ptp/protocol
ptp/protocol
256:263 (3%)
416:423 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
287:294 (3%)
416:423 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
287:294 (3%)
330:337 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
256:263 (3%)
459:466 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
287:294 (3%)
502:509 (2%)
view
8 x 2 ptp/protocol
ptp/protocol
287:294 (3%)
373:380 (2%)
view
7 x 2 ptp/ptp4u/server
ptp/ptp4u/server
190:202 (2%)
226:238 (2%)
view
7 x 2 ntp/chrony
ntp/chrony
342:348 (1%)
357:363 (1%)
view
7 x 2 cmd/ntpcheck/cmd
cmd/ptpcheck/cmd
65:72 (4%)
75:82 (5%)
view
7 x 2 ptp/simpleclient
ptp/simpleclient
35:41 (9%)
100:106 (9%)
view
7 x 2 cmd/ntpcheck/cmd
cmd/ptpcheck/cmd
32:40 (4%)
36:44 (5%)
view
7 x 2 cmd/ntpcheck/checker
cmd/ntpcheck/checker
122:130 (8%)
149:157 (8%)
view
7 x 2 cmd/ntpcheck/checker
cmd/ntpcheck/checker
94:102 (8%)
149:157 (8%)
view
7 x 2 ptp/simpleclient
ptp/simpleclient
69:75 (9%)
100:106 (9%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 ntp/responder/server
ntp/responder/server
54:77 
55:78 
view
10 x 2 cmd/ntpcheck/cmd
cmd/ptpcheck/cmd
214:225 
164:175 
view
9 x 2 timestamp
timestamp
45:57 
45:57 
view