awslabs / aws-amplify-identity-broker
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
  • 19% duplication:
    • 6,269 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,246 duplicated lines
  • 404 duplicates
system19% (1,246 lines)
Duplication per Extension
js18% (938 lines)
yml30% (308 lines)
Duplication per Component (primary)
src/pages/Settings36% (533 lines)
amplify/backend/auth33% (302 lines)
src/components/MfaTotpConfigDialog36% (98 lines)
amplify/backend/function10% (94 lines)
src/components/ChangePasswordDialog31% (62 lines)
src/pages/TermsOfService21% (49 lines)
src/components/VerifyAttributeDialog40% (47 lines)
src/components/LandingPage5% (20 lines)
src/pages/Dashboard12% (14 lines)
src/components/ProtectedRoute19% (9 lines)
amplify/backend/kms8% (6 lines)
src/components/Register23% (6 lines)
src/components/Login37% (6 lines)
ROOT0% (0 lines)
src0% (0 lines)
src/components/LogoutButton0% (0 lines)
src/components/RegisterConfirm0% (0 lines)
src/components/ViewPort0% (0 lines)
src/components/LanguageSelect0% (0 lines)
src/components/Snackbar0% (0 lines)
src/components/ForgotPassword0% (0 lines)
src/components/DividerWithText0% (0 lines)
src/components/AppBar0% (0 lines)
src/redux/reducers0% (0 lines)
src/redux0% (0 lines)
src/i18n/locales0% (0 lines)
src/i18n0% (0 lines)
src/pages/Logout0% (0 lines)
src/pages/ErrorPage0% (0 lines)
public0% (0 lines)

Duplication Between Components (50+ lines)

G src/components/MfaTotpConfigDialog src/components/MfaTotpConfigDialog src/pages/Settings src/pages/Settings src/components/MfaTotpConfigDialog--src/pages/Settings 232 src/components/VerifyAttributeDialog src/components/VerifyAttributeDialog src/components/MfaTotpConfigDialog--src/components/VerifyAttributeDialog 85 src/pages/TermsOfService src/pages/TermsOfService src/pages/Settings--src/pages/TermsOfService 54 src/components/ChangePasswordDialog src/components/ChangePasswordDialog src/components/ChangePasswordDialog--src/components/MfaTotpConfigDialog 80 src/components/ChangePasswordDialog--src/pages/Settings 176 src/components/ChangePasswordDialog--src/components/VerifyAttributeDialog 63 src/components/VerifyAttributeDialog--src/pages/Settings 167

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 404 duplicates...
Size#FoldersFilesLinesCode
25 x 2 src/pages/Settings
src/pages/Settings
tabMfaData.js
tabMfaData.js
118:144 (10%)
174:200 (10%)
view
25 x 2 src/components/MfaTotpConfigDialog
src/components/MfaTotpConfigDialog
MfaTotpConfigDialog.js
MfaTotpConfigDialog.js
109:135 (9%)
147:173 (9%)
view
23 x 2 src/pages/Settings
src/pages/Settings
tabMfaData.js
tabUserData.js
63:86 (9%)
73:96 (7%)
view
19 x 2 src/pages/Settings
src/pages/Settings
tabMfaData.js
tabSignInData.js
63:81 (7%)
112:130 (3%)
view
19 x 2 src/pages/Settings
src/pages/Settings
tabSignInData.js
tabUserData.js
112:130 (3%)
73:91 (6%)
view
17 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
311:327 (1%)
336:352 (1%)
view
17 x 2 amplify/backend/function...tityBrokerAuthorize/src
amplify/backend/function...entityBrokerStorage/src
index.js
index.js
30:50 (8%)
22:42 (26%)
view
15 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
709:723 (1%)
808:822 (1%)
view
15 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
444:458 (1%)
808:822 (1%)
view
15 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
444:458 (1%)
574:588 (1%)
view
15 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
574:588 (1%)
808:822 (1%)
view
15 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
574:588 (1%)
709:723 (1%)
view
15 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
444:458 (1%)
709:723 (1%)
view
13 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
387:399 (1%)
885:897 (1%)
view
13 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
711:723 (1%)
970:982 (1%)
view
13 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
576:588 (1%)
970:982 (1%)
view
13 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
810:822 (1%)
970:982 (1%)
view
13 x 2 src/pages/Settings
src/pages/Settings
tabSignInData.js
tabUserData.js
39:52 (2%)
38:51 (4%)
view
13 x 2 amplify/backend/auth/amplifyIdentityBrokerAuth
amplify/backend/auth/amplifyIdentityBrokerAuth
amplifyIdentityBrokerAuth-cloudformat...
amplifyIdentityBrokerAuth-cloudformat...
446:458 (1%)
970:982 (1%)
view
12 x 2 src/pages/Settings
src/pages/Settings
tabMfaData.js
tabMfaData.js
131:143 (5%)
174:186 (5%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
17 x 2 amplify/backend/function...entityBrokerStorage/src
amplify/backend/function...tityBrokerAuthorize/src
index.js
index.js
25:43 
33:51 
view