awslabs / swagger-ui
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
  • 3% duplication:
    • 13,995 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 515 duplicated lines
  • 32 duplicates
system3% (515 lines)
Duplication per Extension
jsx4% (315 lines)
js3% (158 lines)
scss1% (42 lines)
Duplication per Component (primary)
src/core3% (393 lines)
ROOT57% (80 lines)
src/style1% (42 lines)
swagger-ui-dist-package0% (0 lines)
config/jest0% (0 lines)
src/helpers0% (0 lines)
src/standalone0% (0 lines)
src/plugins0% (0 lines)
src0% (0 lines)
dev-helpers0% (0 lines)
flavors/swagger-ui-react0% (0 lines)
docker/configurator0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 32 duplicates...
Size#FoldersFilesLinesCode
34 x 2 ROOT
ROOT
babel.config.js
babel.config.js
69:110 (25%)
119:160 (25%)
view
24 x 2 src/core/components/auth
src/core/plugins/oas3/components
api-key-auth.jsx
http-auth.jsx
5:33 (34%)
5:33 (22%)
view
24 x 2 src/core/components/auth
src/core/plugins/oas3/components
basic-auth.jsx
http-auth.jsx
61:87 (28%)
69:95 (22%)
view
14 x 2 src/core/components/auth
src/core/plugins/oas3/components
api-key-auth.jsx
http-auth.jsx
69:84 (20%)
111:126 (13%)
view
13 x 2 src/core/plugins/oas3/spec-extensions
src/core/plugins/oas3/spec-extensions
selectors.js
wrap-selectors.js
23:37 (44%)
28:42 (25%)
view
11 x 2 src/core/components
src/core/components
online-validator-badge.jsx
online-validator-badge.jsx
80:90 (11%)
96:106 (11%)
view
10 x 2 src/core/plugins/deep-linking
src/core/plugins/deep-linking
operation-tag-wrapper.jsx
operation-wrapper.jsx
13:25 (52%)
15:27 (47%)
view
10 x 2 src/core/plugins/auth
src/core/plugins/auth
index.js
index.js
28:42 (21%)
53:67 (21%)
view
10 x 2 src/core/components/auth
src/core/components/auth
auth-item.jsx
auths.jsx
52:62 (18%)
120:130 (9%)
view
9 x 2 src/core/components/auth
src/core/components/auth
api-key-auth.jsx
basic-auth.jsx
74:84 (12%)
80:90 (10%)
view
9 x 2 src/core/components/auth
src/core/plugins/oas3/components
basic-auth.jsx
http-auth.jsx
80:90 (10%)
116:126 (8%)
view
9 x 2 src/core/components/auth
src/core/plugins/oas3/components
api-key-auth.jsx
http-auth.jsx
39:48 (12%)
46:55 (8%)
view
9 x 2 src/style
src/style
_layout.scss
_layout.scss
117:126 (1%)
142:151 (1%)
view
9 x 2 src/core/plugins/spec
src/core/plugins/spec
actions.js
actions.js
124:132 (2%)
199:207 (2%)
view
7 x 2 src/core/components/auth
src/core/plugins/oas3/components
oauth2.jsx
http-auth.jsx
257:264 (3%)
116:123 (6%)
view
7 x 2 src/core/components
src/core/components
examples-select.jsx
examples-select.jsx
72:79 (5%)
86:93 (5%)
view
7 x 2 src/core/plugins/oas3/auth-extensions
src/core/plugins/oas3/auth-extensions
wrap-selectors.js
wrap-selectors.js
48:57 (11%)
79:88 (11%)
view
7 x 2 src/core/components/auth
src/core/components/auth
auth-item.jsx
auth-item.jsx
31:37 (12%)
39:45 (12%)
view
7 x 2 src/core/components/auth
src/core/components/auth
api-key-auth.jsx
oauth2.jsx
74:81 (10%)
257:264 (3%)
view
7 x 2 src/core/components/auth
src/core/components/auth
basic-auth.jsx
oauth2.jsx
80:87 (8%)
257:264 (3%)
view