aws-samples / serverless-kotlin-demo
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
  • 13% duplication:
    • 444 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 62 duplicated lines
  • 10 duplicates
system13% (62 lines)
Duplication per Extension
kt17% (62 lines)
Duplication per Component (primary)
infrastructure/src/main/kotlin/com/myorg21% (44 lines)
software/src/main/kotlin/com/amazonaws/sample13% (18 lines)
load-test0% (0 lines)
ROOT0% (0 lines)
software/src/main/kotlin/com/amazonaws/sample/model0% (0 lines)
software0% (0 lines)
infrastructure0% (0 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
9 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureStack.kt
InfrastructureStack.kt
78:86 (7%)
106:114 (7%)
view
8 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureStack.kt
InfrastructureStack.kt
78:85 (6%)
92:99 (6%)
view
8 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureStack.kt
InfrastructureStack.kt
92:99 (6%)
106:113 (6%)
view
6 x 2 software/src/main/kotlin/com/amazonaws/sample
software/src/main/kotlin/com/amazonaws/sample
DeleteProductHandler.kt
GetProductHandler.kt
18:25 (23%)
21:28 (21%)
view
6 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureStack.kt
InfrastructureStack.kt
78:83 (5%)
120:125 (5%)
view
6 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureStack.kt
InfrastructureStack.kt
92:97 (5%)
120:125 (5%)
view
6 x 2 software/src/main/kotlin/com/amazonaws/sample
software/src/main/kotlin/com/amazonaws/sample
DeleteProductHandler.kt
PutProductHandler.kt
18:25 (23%)
21:28 (13%)
view
6 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureApp.kt
InfrastructureApp.kt
13:18 (24%)
23:28 (24%)
view
6 x 2 infrastructure/src/main/kotlin/com/myorg
infrastructure/src/main/kotlin/com/myorg
InfrastructureStack.kt
InfrastructureStack.kt
106:111 (5%)
120:125 (5%)
view
6 x 2 software/src/main/kotlin/com/amazonaws/sample
software/src/main/kotlin/com/amazonaws/sample
GetProductHandler.kt
PutProductHandler.kt
21:28 (21%)
21:28 (13%)
view