microsoft / moodle-local_o365
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
  • 13% duplication:
    • 20,030 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,686 duplicated lines
  • 349 duplicates
system13% (2,686 lines)
Duplication per Extension
php13% (2,565 lines)
scss24% (47 lines)
css14% (46 lines)
js5% (28 lines)
Duplication per Component (primary)
classes/rest22% (592 lines)
classes/feature11% (506 lines)
classes/page13% (348 lines)
classes/bot34% (269 lines)
ROOT16% (265 lines)
classes/task25% (177 lines)
classes/oauth230% (143 lines)
classes/adminsetting10% (131 lines)
classes15% (130 lines)
sass24% (47 lines)
db4% (38 lines)
classes/webservices2% (24 lines)
classes/privacy10% (16 lines)
classes/event0% (0 lines)
classes/form0% (0 lines)
classes/healthcheck0% (0 lines)
classes/obj0% (0 lines)
lang/cs0% (0 lines)
lang/de0% (0 lines)
lang/en0% (0 lines)
lang/es0% (0 lines)
lang/fi0% (0 lines)
lang/fr0% (0 lines)
lang/it0% (0 lines)
lang/ja0% (0 lines)
lang/nl0% (0 lines)
lang/pl0% (0 lines)
lang/pt_br0% (0 lines)

Duplication Between Components (50+ lines)

G classes/feature classes/feature classes/task classes/task classes/feature--classes/task 95 sass sass ROOT ROOT sass--ROOT 93

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 349 duplicates...
Size#FoldersFilesLinesCode
49 x 2 classes/page
classes/page
acp.php
acp.php
1053:1117 (3%)
1173:1238 (3%)
view
39 x 2 classes/oauth2
classes/oauth2
systemapiusertoken.php
systemtoken.php
42:114 (92%)
56:128 (90%)
view
31 x 2 classes/rest
classes/rest
azuread.php
unified.php
157:194 (10%)
1784:1821 (2%)
view
26 x 2 classes/feature/sharepointcustom
classes/task
utils.php
sharepointinit.php
84:115 (17%)
218:249 (15%)
view
25 x 2 ROOT
ROOT
teams_tab.php
teams_tab_configuration.php
167:193 (17%)
178:205 (14%)
view
18 x 2 classes/bot/intents
classes/bot/intents
lateststudents.php
recentstudents.php
80:100 (32%)
79:99 (33%)
view
17 x 2 classes/page
classes/page
acp.php
acp.php
561:582 (1%)
789:810 (1%)
view
17 x 2 ROOT
ROOT
teams_tab.php
teams_tab_configuration.php
144:163 (12%)
116:135 (9%)
view
17 x 2 classes/page
classes/page
acp.php
acp.php
594:612 (1%)
822:840 (1%)
view
16 x 2 classes/task
classes/task
sharepointinit.php
sharepointinit.php
158:177 (9%)
261:279 (9%)
view
16 x 2 ROOT
ROOT
teams_tab.php
teams_tab_configuration.php
110:127 (11%)
212:229 (9%)
view
16 x 2 classes/adminsetting
classes/adminsetting
adminconsent.php
systemapiuser.php
39:92 (57%)
39:92 (34%)
view
16 x 2 classes/page
classes/page
acp.php
acp.php
597:613 (1%)
1702:1718 (1%)
view
15 x 2 classes/adminsetting
classes/adminsetting
adminconsent.php
healthcheck.php
39:91 (53%)
39:91 (62%)
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
2002:2020 (1%)
2037:2055 (1%)
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
2037:2055 (1%)
2072:2090 (1%)
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
1967:1985 (1%)
2037:2055 (1%)
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
1967:1985 (1%)
2002:2020 (1%)
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
1153:1167 (1%)
1206:1220 (1%)
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
2002:2020 (1%)
2072:2090 (1%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 21 unit duplicates...
Size#FoldersFilesLinesCode
27 x 2 ROOT
ROOT
teams_tab.php
teams_tab_configuration.php
167:194 
178:206 
view
19 x 2 classes/rest
classes/rest
azuread.php
unified.php
250:269 
1936:1955 
view
19 x 2 classes/rest
classes/rest
unified.php
unified.php
577:598 
1408:1430 
view
17 x 2 classes
classes
httpclient.php
httpclient.php
92:111 
121:140 
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
482:500 
1026:1044 
view
15 x 2 classes/rest
classes/rest
unified.php
unified.php
522:540 
549:567 
view
14 x 2 classes/oauth2
classes/oauth2
systemapiusertoken.php
systemtoken.php
101:115 
115:129 
view
14 x 2 classes/rest
classes/rest
unified.php
unified.php
2585:2602 
2611:2628 
view
11 x 2 classes/page
classes/page
acp.php
acp.php
72:83 
88:99 
view
10 x 2 classes/feature/usersync
classes/rest
main.php
unified.php
326:336 
1008:1018 
view
10 x 2 classes/oauth2
classes/oauth2
systemapiusertoken.php
systemtoken.php
60:70 
74:84 
view
9 x 3 classes/oauth2
classes/oauth2
classes/oauth2
apptoken.php
systemapiusertoken.php
systemtoken.php
191:200 
78:87 
92:101 
view
9 x 2 classes/oauth2
classes/oauth2
systemapiusertoken.php
systemtoken.php
42:51 
56:65 
view
9 x 2 ROOT
ROOT
teams_tab.php
teams_tab_configuration.php
197:206 
92:101 
view
8 x 3 classes/adminsetting
classes/adminsetting
classes/adminsetting
adminconsent.php
healthcheck.php
systemapiuser.php
54:62 
54:62 
54:62 
view
7 x 2 classes/rest
classes/rest
azuread.php
unified.php
59:66 
67:74 
view
7 x 2 classes/rest
classes/rest
unified.php
unified.php
645:652 
661:668 
view
7 x 2 classes/webservices
classes/webservices
delete_onenoteassignment.php
read_onenoteassignment.php
43:50 
43:50 
view
6 x 2 classes/rest
classes/rest
unified.php
unified.php
1512:1518 
1525:1531 
view
6 x 2 ROOT
ROOT
teams_tab.php
teams_tab_configuration.php
143:149 
115:121 
view