aws-samples / aws-serverless-app-with-aurora-and-python-sql-alchemy-example
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
  • 34% duplication:
    • 456 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 157 duplicated lines
  • 11 duplicates
system34% (157 lines)
Duplication per Extension
yaml38% (117 lines)
py26% (40 lines)
Duplication per Component (primary)
bookstore46% (58 lines)
db_schema38% (37 lines)
bookstore/books36% (27 lines)
rds_proxy27% (22 lines)
db_schema/db_schema_lambda48% (13 lines)
db_schema/db_schema_lambda_layer/python0% (0 lines)
bookstore/reviews0% (0 lines)

Duplication Between Components (50+ lines)

G bookstore bookstore db_schema db_schema bookstore--db_schema 83

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 11 longest duplicates.
See data for all 11 duplicates...
Size#FoldersFilesLinesCode
28 x 2 bookstore
db_schema
template.yaml
template.yaml
87:114 (22%)
51:78 (28%)
view
15 x 2 bookstore
bookstore
template.yaml
template.yaml
30:44 (12%)
59:73 (12%)
view
14 x 2 db_schema
rds_proxy
template.yaml
template.yaml
64:77 (14%)
47:60 (17%)
view
14 x 2 bookstore
rds_proxy
template.yaml
template.yaml
100:113 (11%)
47:60 (17%)
view
9 x 2 bookstore
db_schema
template.yaml
template.yaml
35:43 (7%)
38:46 (9%)
view
9 x 2 bookstore
db_schema
template.yaml
template.yaml
64:72 (7%)
38:46 (9%)
view
8 x 2 bookstore
rds_proxy
template.yaml
template.yaml
87:94 (6%)
34:41 (9%)
view
8 x 2 db_schema
rds_proxy
template.yaml
template.yaml
51:58 (8%)
34:41 (9%)
view
7 x 2 bookstore/books
db_schema/db_schema_lambda
db_connection.py
main.py
35:46 (38%)
38:49 (25%)
view
7 x 2 bookstore/books
bookstore/books
main.py
main.py
54:60 (12%)
78:84 (12%)
view
6 x 2 bookstore/books
db_schema/db_schema_lambda
db_connection.py
main.py
50:56 (33%)
59:65 (22%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 db_schema/db_schema_lambda
bookstore/books
main.py
db_connection.py
0:0 
0:0 
view