aws-samples / aws-twitterbot-workshop
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:
    • 410 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 56 duplicated lines
  • 3 duplicates
system13% (56 lines)
Duplication per Extension
py19% (56 lines)
Duplication per Component (primary)
Bot1/hello_world68% (28 lines)
Bot1/instrumented_file45% (21 lines)
Bot2/ImageUpdate/hello_world5% (7 lines)
Bot10% (0 lines)
Bot2/Poller0% (0 lines)
Bot2/ImageUpdate0% (0 lines)
Longest Duplicates
The list of 3 longest duplicates.
See data for all 3 duplicates...
Size#FoldersFilesLinesCode
13 x 2 Bot1/hello_world
Bot1/instrumented_file
twitterRetweet.py
twitterRetweet.py
41:58 (32%)
46:63 (28%)
view
8 x 2 Bot1/hello_world
Bot1/instrumented_file
twitterRetweet.py
twitterRetweet.py
29:36 (20%)
32:39 (17%)
view
7 x 2 Bot1/hello_world
Bot2/ImageUpdate/hello_world
twitterRetweet.py
twitterUpdateImage.py
9:16 (17%)
25:32 (5%)
view