aws-samples / aws-sso-extensions-for-enterprise
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
  • 35% duplication:
    • 7,896 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,833 duplicated lines
  • 732 duplicates
system35% (2,833 lines)
Duplication per Extension
ts36% (2,833 lines)
Duplication per Component (primary)
lib/lambda-functions/application-handlers51% (1,127 lines)
lib/lambda-functions/user-interface-handlers66% (670 lines)
lib/constructs19% (456 lines)
lib/stacks/pipelineStageStacks23% (238 lines)
lib/lambda-functions/current-config-handlers30% (169 lines)
lib/lambda-functions/custom-waiters55% (103 lines)
lib/stacks/pipeline38% (70 lines)
lib/lambda-functions/helpers0% (0 lines)
lib/build0% (0 lines)
config0% (0 lines)
ROOT0% (0 lines)
cfn-nag0% (0 lines)

Duplication Between Components (50+ lines)

G lib/lambda-functions/application-handlers lib/lambda-functions/application-handlers lib/lambda-functions/current-config-handlers lib/lambda-functions/current-config-handlers lib/lambda-functions/application-handlers--lib/lambda-functions/current-config-handlers 154 lib/lambda-functions/user-interface-handlers lib/lambda-functions/user-interface-handlers lib/lambda-functions/application-handlers--lib/lambda-functions/user-interface-handlers 142 lib/stacks/pipeline lib/stacks/pipeline lib/stacks/pipelineStageStacks lib/stacks/pipelineStageStacks lib/stacks/pipeline--lib/stacks/pipelineStageStacks 56

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 732 duplicates...
Size#FoldersFilesLinesCode
33 x 2 lib/lambda-functions/user-interface-handlers/src
lib/lambda-functions/user-interface-handlers/src
linkCu.ts
linkDel.ts
39:72 (25%)
34:67 (28%)
view
31 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
groupsCud.ts
usersCud.ts
58:95 (13%)
40:77 (12%)
view
27 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
orgEvents.ts
usersCud.ts
52:80 (7%)
58:86 (11%)
view
26 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
groupsCud.ts
usersCud.ts
165:191 (11%)
155:181 (10%)
view
23 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
permissionSetSync.ts
usersCud.ts
63:86 (10%)
62:84 (9%)
view
23 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
orgEvents.ts
permissionSetSync.ts
56:78 (6%)
63:86 (10%)
view
20 x 2 lib/constructs
lib/constructs
link-crud.ts
link-crud.ts
203:224 (8%)
246:267 (8%)
view
19 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
linkTopicProcessor.ts
orgEvents.ts
91:111 (8%)
63:83 (5%)
view
19 x 2 lib/lambda-functions/user-interface-handlers/src
lib/lambda-functions/user-interface-handlers/src
permissionSetApi.ts
permissionSetApi.ts
146:166 (7%)
225:243 (7%)
view
18 x 2 lib/lambda-functions/user-interface-handlers/src
lib/lambda-functions/user-interface-handlers/src
linkCu.ts
linkDel.ts
125:143 (13%)
109:127 (15%)
view
18 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
groupsCud.ts
orgEvents.ts
76:95 (7%)
52:71 (5%)
view
18 x 2 lib/constructs
lib/constructs
permission-set-crud.ts
permission-set-crud.ts
119:136 (7%)
174:191 (7%)
view
18 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
linkTopicProcessor.ts
usersCud.ts
91:108 (8%)
69:86 (7%)
view
17 x 2 lib/lambda-functions/user-interface-handlers/src
lib/lambda-functions/user-interface-handlers/src
permissionSetCu.ts
permissionSetDel.ts
150:166 (10%)
112:129 (12%)
view
17 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
permissionSetTopicProcessor.ts
permissionSetTopicProcessor.ts
390:406 (2%)
432:448 (2%)
view
17 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
linkTopicProcessor.ts
permissionSetSync.ts
60:81 (7%)
47:69 (7%)
view
16 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
linkTopicProcessor.ts
permissionSetSync.ts
91:106 (7%)
71:86 (7%)
view
16 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
groupsCud.ts
permissionSetSync.ts
80:95 (6%)
63:79 (7%)
view
14 x 2 lib/lambda-functions/application-handlers/src
lib/lambda-functions/application-handlers/src
groupsCud.ts
usersCud.ts
92:107 (6%)
83:98 (5%)
view
14 x 2 lib/stacks/pipelineStageStacks
lib/stacks/pipelineStageStacks
sso-import-artefacts-part1.ts
sso-import-artefacts-part1.ts
208:224 (5%)
273:289 (5%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
22 x 2 lib/constructs
lib/constructs
link-processor.ts
link-crud.ts
139:161 
142:164 
view
22 x 2 lib/constructs
lib/constructs
permission-set-crud.ts
permission-set-crud.ts
110:132 
165:187 
view
21 x 2 lib/constructs
lib/constructs
org-events.ts
sso-group-processor.ts
46:67 
48:69 
view
20 x 5 lib/constructs
lib/constructs
lib/constructs
lib/constructs
lib/constructs
link-processor.ts
org-events.ts
permission-set-processor.ts
sso-group-processor.ts
link-crud.ts
141:161 
47:67 
66:86 
49:69 
144:164 
view
20 x 2 lib/constructs
lib/constructs
permission-set-crud.ts
permission-set-crud.ts
112:132 
167:187 
view
18 x 2 lib/constructs
lib/constructs
link-crud.ts
link-crud.ts
194:212 
237:255 
view
16 x 2 lib/constructs
lib/constructs
link-crud.ts
link-crud.ts
196:212 
239:255 
view