aws-samples / amazon-opensearch-service-monitor
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
  • 3% duplication:
    • 1,354 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 45 duplicated lines
  • 6 duplicates
system3% (45 lines)
Duplication per Extension
py3% (45 lines)
Duplication per Component (primary)
CWMetricsToOpenSearch/es_sink5% (29 lines)
opensearch5% (16 lines)
ROOT0% (0 lines)
CWMetricsToOpenSearch0% (0 lines)
CWLogsToOpenSearch0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
8 x 2 opensearch
opensearch
setupCWSubscriptionFilter.py
setupCWSubscriptionFilter.py
29:39 (13%)
53:64 (13%)
view
8 x 2 CWMetricsToOpenSearch/es_sink
CWMetricsToOpenSearch/es_sink
descriptor.py
transport_utils.py
1:10 (6%)
1:10 (12%)
view
7 x 2 CWMetricsToOpenSearch/es_sink
CWMetricsToOpenSearch/es_sink
flushing_buffer.py
transport_utils.py
1:9 (8%)
1:9 (10%)
view
7 x 2 CWMetricsToOpenSearch/es_sink
CWMetricsToOpenSearch/es_sink
descriptor.py
flushing_buffer.py
1:9 (6%)
1:9 (8%)
view
6 x 2 CWMetricsToOpenSearch/es_sink
CWMetricsToOpenSearch/es_sink
line_buffer.py
transport_utils.py
3:10 (6%)
3:10 (9%)
view
6 x 2 CWMetricsToOpenSearch/es_sink
CWMetricsToOpenSearch/es_sink
descriptor.py
line_buffer.py
3:10 (5%)
3:10 (6%)
view