facebook / IT-CPE
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
  • 8% duplication:
    • 13,024 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,051 duplicated lines
  • 108 duplicates
system8% (1,051 lines)
Duplication per Extension
rb8% (906 lines)
py5% (145 lines)
Duplication per Component (primary)
itchef/cookbooks/fb_helpers9% (209 lines)
itchef/cookbooks/cpe_applocker26% (208 lines)
itchef/cookbooks/cpe_chrome4% (128 lines)
itchef/cookbooks/cpe_helpers8% (84 lines)
legacy/adobe_tools14% (81 lines)
itchef/cookbooks/cpe_remote10% (58 lines)
itchef/cookbooks/fb_launchd20% (56 lines)
itchef/cookbooks/cpe_logger22% (53 lines)
legacy/autodmg_cache_builder5% (32 lines)
itchef/cookbooks/cpe_flatpak6% (24 lines)
itchef/cookbooks/cpe_nomad6% (21 lines)
pantri/scripts/lib1% (18 lines)
itchef/cookbooks/cpe_powermanagement20% (16 lines)
pantri/scripts8% (14 lines)
itchef/cookbooks/cpe_munki4% (14 lines)
itchef/cookbooks/cpe_windows_update_for_business3% (14 lines)
itchef/cookbooks/cpe_deprecation_notifier6% (9 lines)
itchef/cookbooks/cpe_node_customizations33% (6 lines)
itchef/cookbooks/cpe_user_customizations26% (6 lines)
legacy/autopkg_tools0% (0 lines)
itchef/cookbooks/cpe_dconf0% (0 lines)
itchef/cookbooks/cpe_gnome_software0% (0 lines)
itchef/cookbooks/cpe_symlinks0% (0 lines)
itchef/cookbooks/cpe_pathsd0% (0 lines)
itchef/cookbooks/cpe_launchd0% (0 lines)
itchef/cookbooks/cpe_win_telemetry0% (0 lines)
itchef/cookbooks/cpe_profiles0% (0 lines)
itchef/cookbooks/cpe_hosts0% (0 lines)
itchef/cookbooks/cpe_bluetooth0% (0 lines)
itchef/cookbooks/cpe_profiles_local0% (0 lines)
itchef/cookbooks/cpe_kernel_channel0% (0 lines)
itchef/cookbooks/cpe_init0% (0 lines)
itchef/cookbooks/cpe_preferencepanes0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 108 duplicates...
Size#FoldersFilesLinesCode
35 x 2 itchef/cookbooks/cpe_applocker/configurations
itchef/cookbooks/cpe_applocker/configurations
51:85 (37%)
18:52 (44%)
view
27 x 2 itchef/cookbooks/cpe_chrome/spec
itchef/cookbooks/cpe_chrome/spec
22:48 (12%)
24:51 (25%)
view
20 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
388:409 (5%)
423:444 (5%)
view
18 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
292:309 (4%)
381:398 (4%)
view
18 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
347:364 (4%)
381:398 (4%)
view
18 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
292:309 (4%)
347:364 (4%)
view
16 x 2 itchef/cookbooks/cpe_chrome/resources
itchef/cookbooks/cpe_chrome/resources
104:119 (6%)
195:210 (6%)
view
15 x 2 itchef/cookbooks/cpe_applocker/configurations
itchef/cookbooks/cpe_applocker/configurations
2:18 (15%)
2:18 (19%)
view
14 x 2 itchef/cookbooks/cpe_applocker/configurations
itchef/cookbooks/cpe_applocker/configurations
84:97 (14%)
68:81 (17%)
view
11 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
299:309 (2%)
423:433 (2%)
view
11 x 2 itchef/cookbooks/cpe_logger/libraries
itchef/cookbooks/cpe_logger/libraries
60:70 (11%)
82:92 (11%)
view
11 x 2 itchef/cookbooks/cpe_applocker/attributes
itchef/cookbooks/cpe_applocker/configurations
31:41 (44%)
5:16 (14%)
view
11 x 2 itchef/cookbooks/cpe_applocker/attributes
itchef/cookbooks/cpe_applocker/configurations
43:53 (44%)
87:97 (11%)
view
11 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
354:364 (2%)
423:433 (2%)
view
11 x 2 itchef/cookbooks/cpe_applocker/attributes
itchef/cookbooks/cpe_applocker/configurations
31:41 (44%)
5:16 (11%)
view
11 x 2 itchef/cookbooks/cpe_applocker/attributes
itchef/cookbooks/cpe_applocker/configurations
43:53 (44%)
71:81 (14%)
view
11 x 2 legacy/adobe_tools
legacy/adobe_tools
666:677 (2%)
689:700 (2%)
view
10 x 2 itchef/cookbooks/cpe_helpers/spec
itchef/cookbooks/cpe_helpers/spec
16:26 (4%)
16:26 (12%)
view
10 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
254:264 (2%)
274:284 (2%)
view
9 x 2 itchef/cookbooks/fb_launchd/spec
itchef/cookbooks/fb_launchd/spec
102:111 (4%)
140:149 (4%)
view
9 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
323:331 (2%)
404:412 (2%)
view
9 x 2 itchef/cookbooks/cpe_dep...tion_notifier/resources
itchef/cookbooks/cpe_nomad/resources
123:132 (10%)
170:179 (6%)
view
9 x 2 itchef/cookbooks/fb_launchd/spec
itchef/cookbooks/fb_launchd/spec
135:143 (4%)
176:184 (4%)
view
9 x 2 itchef/cookbooks/cpe_helpers/spec
itchef/cookbooks/cpe_helpers/spec
43:51 (5%)
96:104 (5%)
view
8 x 2 legacy/autodmg_cache_builder
legacy/autodmg_cache_builder
101:110 (8%)
128:137 (8%)
view
8 x 2 itchef/cookbooks/cpe_logger/libraries
itchef/cookbooks/cpe_logger/libraries
82:89 (8%)
108:115 (8%)
view
8 x 2 legacy/autodmg_cache_builder
legacy/autodmg_cache_builder
623:630 (1%)
73:80 (8%)
view
8 x 2 itchef/cookbooks/cpe_chrome/resources
itchef/cookbooks/cpe_chrome/resources
231:238 (2%)
260:267 (2%)
view
8 x 2 itchef/cookbooks/cpe_logger/libraries
itchef/cookbooks/cpe_logger/libraries
51:58 (8%)
73:80 (8%)
view
8 x 2 itchef/cookbooks/cpe_remote/resources
itchef/cookbooks/cpe_remote/resources
165:173 (4%)
162:170 (5%)
view
8 x 2 itchef/cookbooks/cpe_powermanagement/attributes
itchef/cookbooks/cpe_powermanagement/attributes
27:34 (40%)
36:43 (40%)
view
8 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
173:181 (3%)
205:213 (3%)
view
8 x 2 itchef/cookbooks/cpe_remote/resources
itchef/cookbooks/cpe_remote/resources
138:145 (7%)
176:183 (5%)
view
8 x 2 itchef/cookbooks/cpe_logger/libraries
itchef/cookbooks/cpe_logger/libraries
60:67 (8%)
108:115 (8%)
view
8 x 2 itchef/cookbooks/cpe_remote/resources
itchef/cookbooks/cpe_remote/resources
124:132 (7%)
165:173 (4%)
view
8 x 2 itchef/cookbooks/cpe_remote/resources
itchef/cookbooks/cpe_remote/resources
124:132 (7%)
162:170 (5%)
view
7 x 2 legacy/adobe_tools
legacy/adobe_tools
10:19 (17%)
9:18 (43%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
323:329 (1%)
426:432 (1%)
view
7 x 2 itchef/cookbooks/cpe_munki/resources
itchef/cookbooks/cpe_munki/resources
55:61 (16%)
35:41 (24%)
view
7 x 2 itchef/cookbooks/cpe_logger/libraries
itchef/cookbooks/cpe_logger/libraries
26:32 (7%)
73:79 (7%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
357:363 (1%)
404:410 (1%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
323:329 (1%)
357:363 (1%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
404:410 (1%)
426:432 (1%)
view
7 x 2 itchef/cookbooks/cpe_chrome/resources
itchef/cookbooks/cpe_chrome/resources
287:293 (2%)
310:316 (2%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
314:320 (1%)
382:388 (1%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
292:298 (1%)
415:421 (1%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
302:308 (1%)
404:410 (1%)
view
7 x 2 legacy/adobe_tools
legacy/adobe_tools
10:19 (21%)
9:18 (43%)
view
7 x 2 itchef/cookbooks/cpe_helpers/spec
itchef/cookbooks/cpe_helpers/spec
69:75 (3%)
93:99 (3%)
view
7 x 2 itchef/cookbooks/fb_helpers/spec
itchef/cookbooks/fb_helpers/spec
347:353 (1%)
415:421 (1%)
view