awslabs / collectd-cloudwatch
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
  • 2% duplication:
    • 2,097 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 56 duplicated lines
  • 4 duplicates
system2% (56 lines)
Duplication per Extension
py2% (56 lines)
Duplication per Component (primary)
src1% (15 lines)
src/cloudwatch/modules/configuration3% (15 lines)
src/cloudwatch/modules/client4% (14 lines)
src/cloudwatch/modules4% (12 lines)
src/cloudwatch0% (0 lines)
src/cloudwatch/modules/logger0% (0 lines)
src/cloudwatch/modules/collectd_integration0% (0 lines)
Longest Duplicates
The list of 4 longest duplicates.
See data for all 4 duplicates...
Size#FoldersFilesLinesCode
8 x 2 src/cloudwatch/modules/configuration
src
metadatareader.py
setup.py
34:47 (10%)
228:241 (<1%)
view
7 x 2 src/cloudwatch/modules/client
src/cloudwatch/modules/client
ec2getclient.py
putclient.py
32:38 (15%)
56:62 (9%)
view
7 x 2 src/cloudwatch/modules/configuration
src
metadatareader.py
setup.py
22:28 (9%)
218:224 (<1%)
view
6 x 2 src/cloudwatch/modules
src/cloudwatch/modules
flusher.py
flusher.py
101:106 (4%)
138:143 (4%)
view