aws-samples / i-love-my-local-farmer
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
  • 16% duplication:
    • 4,561 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 762 duplicated lines
  • 74 duplicates
system16% (762 lines)
Duplication per Extension
java9% (358 lines)
ps185% (307 lines)
jsp33% (97 lines)
Duplication per Component (primary)
IdentityJourney/integration/src84% (307 lines)
JavaSpringMigration/app/src13% (109 lines)
DeliveryApi/ApiHandlers/tst20% (102 lines)
DeliveryApi/cdk/src12% (98 lines)
JavaSpringMigration/cdk/src23% (70 lines)
WorkingFromHome/ClientConnection/src21% (49 lines)
WorkingFromHome/ClientConnection/AdConnectorCustomResource19% (21 lines)
DeliveryApi/ApiHandlers/src1% (6 lines)
FlywayLambdaService/src/main0% (0 lines)
WorkingFromHome/CustomResourceUtils/src0% (0 lines)
WorkingFromHome/SiteToSiteConnection/src0% (0 lines)

Duplication Between Components (50+ lines)

G DeliveryApi/cdk/src DeliveryApi/cdk/src JavaSpringMigration/cdk/src JavaSpringMigration/cdk/src DeliveryApi/cdk/src--JavaSpringMigration/cdk/src 140

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 74 duplicates...
Size#FoldersFilesLinesCode
102 x 2 IdentityJourney/integrat.../app/IncrementalSyncAWS
IdentityJourney/integration/src/app/ResetSyncAWS
run.ps1
run.ps1
1:119 (63%)
1:119 (61%)
view
27 x 2 IdentityJourney/integrat.../app/IncrementalSyncAWS
IdentityJourney/integration/src/app/ResetSyncAWS
run.ps1
run.ps1
145:177 (16%)
150:182 (16%)
view
23 x 2 DeliveryApi/cdk/src/main.../com/ilmlf/delivery/api
WorkingFromHome/ClientCo.../ilmlf/clientconnection
Hashing.java
Hashing.java
32:63 (100%)
11:42 (100%)
view
23 x 2 JavaSpringMigration/cdk/...a/com/ilmlf/product/api
WorkingFromHome/ClientCo.../ilmlf/clientconnection
Hashing.java
Hashing.java
32:63 (100%)
11:42 (100%)
view
23 x 2 DeliveryApi/cdk/src/main.../com/ilmlf/delivery/api
JavaSpringMigration/cdk/...a/com/ilmlf/product/api
Hashing.java
Hashing.java
32:63 (100%)
32:63 (100%)
view
16 x 2 IdentityJourney/integrat.../app/IncrementalSyncAWS
IdentityJourney/integration/src/app/ResetSyncAWS
run.ps1
run.ps1
122:140 (10%)
122:140 (9%)
view
13 x 2 WorkingFromHome/ClientCo.../ilmlf/clientconnection
WorkingFromHome/ClientCo.../ilmlf/clientconnection
AdConnectorConstruct.java
AdConnectorConstruct.java
119:131 (10%)
182:194 (10%)
view
12 x 2 JavaSpringMigration/app/...in/webapp/WEB-INF/views
JavaSpringMigration/app/...in/webapp/WEB-INF/views
pricing.jsp
productList.jsp
16:29 (26%)
8:24 (36%)
view
12 x 2 JavaSpringMigration/app/...in/webapp/WEB-INF/views
JavaSpringMigration/app/...in/webapp/WEB-INF/views
pricingList.jsp
productList.jsp
14:27 (30%)
8:24 (36%)
view
12 x 2 JavaSpringMigration/app/...in/webapp/WEB-INF/views
JavaSpringMigration/app/...in/webapp/WEB-INF/views
pricing.jsp
pricingList.jsp
16:29 (26%)
14:27 (30%)
view
11 x 2 JavaSpringMigration/app/...in/webapp/WEB-INF/views
JavaSpringMigration/app/...in/webapp/WEB-INF/views
product.jsp
registration.jsp
17:30 (28%)
12:27 (19%)
view
11 x 2 DeliveryApi/cdk/src/main...a/com/ilmlf/delivery/db
JavaSpringMigration/cdk/...va/com/ilmlf/product/db
DbStack.java
DbStack.java
158:171 (11%)
146:159 (15%)
view
10 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
79:90 (9%)
105:116 (9%)
view
10 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
105:116 (9%)
143:154 (9%)
view
10 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
79:90 (9%)
143:154 (9%)
view
9 x 2 WorkingFromHome/ClientCo...onnector/customresource
WorkingFromHome/ClientCo...onnector/customresource
SecretsUtil.java
SecretsUtil.java
26:36 (26%)
48:58 (26%)
view
9 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
105:115 (8%)
125:135 (8%)
view
9 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
125:135 (8%)
143:153 (8%)
view
9 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
79:89 (8%)
125:135 (8%)
view
8 x 2 DeliveryApi/cdk/src/main...a/com/ilmlf/delivery/db
JavaSpringMigration/cdk/...va/com/ilmlf/product/db
DbStack.java
DbStack.java
90:97 (8%)
77:84 (11%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
16 x 3 WorkingFromHome/ClientCo.../ilmlf/clientconnection
JavaSpringMigration/cdk/...a/com/ilmlf/product/api
DeliveryApi/cdk/src/main.../com/ilmlf/delivery/api
Hashing.java
Hashing.java
Hashing.java
29:47 
50:68 
50:68 
view
14 x 2 DeliveryApi/ApiHandlers/...f/delivery/api/handlers
DeliveryApi/ApiHandlers/...f/delivery/api/handlers
GetSlotsTest.java
GetSlotsTest.java
104:121 
142:159 
view
12 x 3 WorkingFromHome/ClientCo.../ilmlf/clientconnection
JavaSpringMigration/cdk/...a/com/ilmlf/product/api
DeliveryApi/cdk/src/main.../com/ilmlf/delivery/api
Hashing.java
Hashing.java
Hashing.java
12:27 
33:48 
33:48 
view