aws-samples / mturk-code-samples
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
  • 17% duplication:
    • 382 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 66 duplicated lines
  • 3 duplicates
system17% (66 lines)
Duplication per Extension
py44% (44 lines)
rb20% (22 lines)
Duplication per Component (primary)
Python44% (44 lines)
Ruby20% (22 lines)
Javascript0% (0 lines)
Java0% (0 lines)
Longest Duplicates
The list of 3 longest duplicates.
See data for all 3 duplicates...
Size#FoldersFilesLinesCode
16 x 2 Python
Python
CreateHitSample.py
RetrieveAndApproveHitSample.py
31:47 (32%)
36:52 (32%)
view
11 x 2 Ruby
Ruby
mturk_sample_part_one_create_hit.rb
mturk_sample_part_two_approve_and_del...
17:42 (18%)
17:42 (25%)
view
6 x 2 Python
Python
CreateHitSample.py
RetrieveAndApproveHitSample.py
51:56 (12%)
56:61 (12%)
view