aws-samples / chime-voiceconnector-agent-assist
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
  • 23% duplication:
    • 2,919 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 676 duplicated lines
  • 79 duplicates
system23% (676 lines)
Duplication per Extension
yml36% (418 lines)
js19% (258 lines)
Duplication per Component (primary)
amplify/backend31% (424 lines)
infrastructure/function33% (118 lines)
src/utils28% (106 lines)
src/agentAssist12% (28 lines)
src/apps0% (0 lines)
src/constants0% (0 lines)
src0% (0 lines)
src/search0% (0 lines)
src/styles0% (0 lines)
public0% (0 lines)

Duplication Between Components (50+ lines)

G infrastructure/function infrastructure/function src/utils src/utils infrastructure/function--src/utils 52

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 79 duplicates...
Size#FoldersFilesLinesCode
31 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
454:484 (4%)
504:534 (4%)
view
21 x 2 infrastructure/function/...StreamingLambdaFunction
infrastructure/function/...StreamingLambdaFunction
index.js
index.js
43:63 (39%)
65:85 (28%)
view
20 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
364:383 (2%)
507:526 (2%)
view
20 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
364:383 (2%)
457:476 (2%)
view
19 x 2 infrastructure/function/...StreamingLambdaFunction
infrastructure/function/src/transcriptToESFunction
index.js
index.js
64:82 (25%)
40:58 (20%)
view
18 x 2 infrastructure/function/src/transcriptToESFunction
src/utils
index.js
transcript.js
89:108 (18%)
80:99 (22%)
view
18 x 2 infrastructure/function/...StreamingLambdaFunction
infrastructure/function/src/transcriptToESFunction
index.js
index.js
43:60 (33%)
41:58 (18%)
view
17 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/awscloudformation
cognitocf0c6096-cloudformation-templa...
nested-cloudformation-stack.yml
383:399 (2%)
302:318 (3%)
view
16 x 2 amplify/backend/awscloudformation
amplify/backend/awscloudformation
nested-cloudformation-stack.yml
nested-cloudformation-stack.yml
34:49 (3%)
55:70 (3%)
view
16 x 2 src/utils
src/utils
elasticsearch.js
elasticsearch.js
161:178 (8%)
204:221 (8%)
view
14 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
604:617 (1%)
622:635 (1%)
view
14 x 2 infrastructure/function/...StreamingLambdaFunction
infrastructure/function/src/searchLambdaFunction
index.js
index.js
66:79 (18%)
32:45 (25%)
view
14 x 2 infrastructure/function/...StreamingLambdaFunction
infrastructure/function/src/searchLambdaFunction
index.js
index.js
44:57 (26%)
32:45 (25%)
view
14 x 2 infrastructure/function/src/searchLambdaFunction
infrastructure/function/src/transcriptToESFunction
index.js
index.js
32:45 (25%)
42:55 (14%)
view
14 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
205:218 (1%)
375:388 (1%)
view
12 x 2 src/utils
src/utils
elasticsearch.js
elasticsearch.js
61:74 (6%)
208:221 (6%)
view
12 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
103:114 (1%)
154:165 (1%)
view
12 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
103:114 (1%)
178:189 (1%)
view
12 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
126:137 (1%)
178:189 (1%)
view
12 x 2 amplify/backend/auth/cognitocf0c6096
amplify/backend/auth/cognitocf0c6096
cognitocf0c6096-cloudformation-templa...
cognitocf0c6096-cloudformation-templa...
154:165 (1%)
178:189 (1%)
view