aws-samples / aws-saas-factory-billing-and-metering-reference-implementation
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
  • 15% duplication:
    • 1,449 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 226 duplicated lines
  • 31 duplicates
system15% (226 lines)
Duplication per Extension
yaml37% (158 lines)
java6% (68 lines)
Duplication per Component (primary)
ROOT37% (158 lines)
src/main/java/com/amazonaws/partners/saasfactory/metering/aggregation7% (36 lines)
src/main/java/com/amazonaws/partners/saasfactory/metering/common6% (26 lines)
src/main/java/com/amazonaws/partners/saasfactory/metering/onboarding8% (6 lines)
src/main/java/com/amazonaws/partners/saasfactory/metering/billing0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 31 duplicates...
Size#FoldersFilesLinesCode
15 x 2 ROOT
ROOT
template.yaml
template.yaml
209:223 (3%)
390:404 (3%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
241:252 (2%)
414:425 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
77:88 (2%)
147:158 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
98:109 (2%)
241:252 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
196:207 (2%)
377:388 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
77:88 (2%)
377:388 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
77:88 (2%)
196:207 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
147:158 (2%)
196:207 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
147:158 (2%)
377:388 (2%)
view
12 x 2 ROOT
ROOT
template.yaml
template.yaml
98:109 (2%)
414:425 (2%)
view
11 x 2 src/main/java/com/amazon...ry/metering/aggregation
src/main/java/com/amazon...ry/metering/aggregation
BillingEventAggregation.java
StripeBillingPublish.java
126:137 (4%)
141:152 (4%)
view
8 x 2 src/main/java/com/amazon...ry/metering/aggregation
src/main/java/com/amazon...factory/metering/common
BillingEventAggregation.java
TenantConfiguration.java
126:134 (3%)
113:121 (6%)
view
8 x 2 src/main/java/com/amazon...ry/metering/aggregation
src/main/java/com/amazon...factory/metering/common
StripeBillingPublish.java
TenantConfiguration.java
141:149 (3%)
113:121 (6%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
196:203 (1%)
326:333 (1%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
77:84 (1%)
269:276 (1%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
196:203 (1%)
269:276 (1%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
269:276 (1%)
326:333 (1%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
77:84 (1%)
326:333 (1%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
147:154 (1%)
269:276 (1%)
view
8 x 2 ROOT
ROOT
template.yaml
template.yaml
269:276 (1%)
377:384 (1%)
view