aws-samples / pcluster-manager
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
  • 11% duplication:
    • 5,787 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 651 duplicated lines
  • 78 duplicates
system11% (651 lines)
Duplication per Extension
js13% (567 lines)
yaml6% (48 lines)
py5% (36 lines)
Duplication per Component (primary)
frontend/src/pages13% (428 lines)
frontend/src9% (75 lines)
frontend/src/components13% (48 lines)
infrastructure6% (48 lines)
awslambda17% (36 lines)
infrastructure/cognitolambda10% (16 lines)
api0% (0 lines)
ROOT0% (0 lines)
frontend/src/redux0% (0 lines)
frontend/public0% (0 lines)

Duplication Between Components (50+ lines)

G frontend/src/components frontend/src/components frontend/src/pages frontend/src/pages frontend/src/components--frontend/src/pages 62

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 78 duplicates...
Size#FoldersFilesLinesCode
30 x 2 frontend/src/pages/Clusters
frontend/src/pages/CustomImages
Clusters.js
CustomImages.js
143:173 (19%)
187:217 (16%)
view
21 x 2 frontend/src/pages/CustomImages
frontend/src/pages/OfficialImages
CustomImages.js
OfficialImages.js
73:95 (11%)
45:67 (21%)
view
16 x 2 frontend/src/pages/OfficialImages
frontend/src/pages/Users
OfficialImages.js
Users.js
113:129 (16%)
161:177 (11%)
view
13 x 2 frontend/src/pages/OfficialImages
frontend/src/pages/Users
OfficialImages.js
Users.js
51:65 (13%)
95:109 (9%)
view
13 x 2 frontend/src/pages/CustomImages
frontend/src/pages/Users
CustomImages.js
Users.js
79:93 (7%)
95:109 (9%)
view
12 x 2 frontend/src/components
frontend/src/pages/CustomImages
FileChooser.js
ImageBuildDialog.js
50:62 (24%)
55:67 (10%)
view
11 x 2 awslambda
awslambda
serverless_wsgi.py
serverless_wsgi.py
196:206 (6%)
250:260 (6%)
view
11 x 2 frontend/src/pages/Clusters
frontend/src/pages/Clusters
ClusterDeleteDialog.js
ClusterStopDialog.js
34:45 (35%)
34:45 (34%)
view
10 x 2 frontend/src/pages/Clusters
frontend/src/pages/CustomImages
Clusters.js
CustomImages.js
80:91 (6%)
81:92 (5%)
view
10 x 2 frontend/src/pages/Clusters
frontend/src/pages/Users
Clusters.js
Users.js
80:91 (6%)
97:108 (7%)
view
10 x 2 frontend/src/pages/Clusters
frontend/src/pages/OfficialImages
Clusters.js
OfficialImages.js
80:91 (6%)
53:64 (10%)
view
9 x 2 frontend/src/pages/Home
frontend/src/pages/OfficialImages
Home.js
OfficialImages.js
36:44 (37%)
115:123 (9%)
view
9 x 2 frontend/src/pages/Home
frontend/src/pages/Users
Home.js
Users.js
36:44 (37%)
163:171 (6%)
view
8 x 2 frontend/src/components
frontend/src/pages/CustomImages
FileChooser.js
ImageBuildDialog.js
65:72 (16%)
70:77 (7%)
view
8 x 2 frontend/src/pages/Clusters
frontend/src/pages/CustomImages
ClusterProperties.js
CustomImageDetails.js
33:40 (11%)
41:48 (7%)
view
8 x 2 infrastructure/cognitolambda
infrastructure/cognitolambda
index.js
index.js
44:51 (5%)
95:102 (5%)
view
8 x 2 frontend/src/pages/CustomImages
frontend/src/pages/OfficialImages
CustomImages.js
OfficialImages.js
112:121 (4%)
84:93 (8%)
view
8 x 2 frontend/src/pages/Clusters
frontend/src/pages/Clusters
ClusterInstances.js
Clusters.js
122:130 (5%)
79:87 (5%)
view
8 x 2 frontend/src/pages/Clusters
frontend/src/pages/CustomImages
ClusterStackEvents.js
CustomImageStackEvents.js
54:61 (25%)
46:53 (32%)
view
8 x 2 frontend/src/components
frontend/src/pages/Clusters
Status.js
ClusterInstances.js
23:30 (33%)
39:46 (5%)
view