awslabs / aws-central-log-aggregator
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:
    • 3,219 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 438 duplicated lines
  • 52 duplicates
system13% (438 lines)
Duplication per Extension
yaml21% (320 lines)
java7% (102 lines)
py4% (16 lines)
Duplication per Component (primary)
automation/template21% (320 lines)
src/main/java/com/aws/logaggregator/connector29% (70 lines)
src/main/java/com/aws/logaggregator/model8% (20 lines)
automation/lambda/handlers4% (16 lines)
src/main/java/com/aws/logaggregator/processor4% (12 lines)
src/main/java/com/aws/logaggregator/security0% (0 lines)
src/main/java/com/aws/logaggregator/exception0% (0 lines)
src/main/java/com/aws/logaggregator/error0% (0 lines)
src/main/java/com/aws/logaggregator/config0% (0 lines)
src/main/java/com/aws/logaggregator/logparser0% (0 lines)
src/main/java/com/aws/logaggregator/utils0% (0 lines)
src/main/java/com/aws/logaggregator/factory0% (0 lines)
src/main/java/com/aws/logaggregator0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 52 duplicates...
Size#FoldersFilesLinesCode
19 x 2 src/main/java/com/aws/logaggregator/connector
src/main/java/com/aws/logaggregator/connector
KafkaConnector.java
KinesisConnector.java
55:79 (35%)
53:77 (35%)
view
18 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-primary.yaml
495:512 (2%)
647:664 (2%)
view
12 x 2 automation/template
automation/template
log-aggregator-nginx.yaml
log-aggregator-primary.yaml
144:155 (6%)
345:356 (1%)
view
11 x 2 automation/template
automation/template
log-aggregator-vpc.yaml
log-aggregator-vpc.yaml
196:206 (2%)
255:265 (2%)
view
11 x 2 automation/template
automation/template
log-aggregator-nginx.yaml
log-aggregator-primary.yaml
157:167 (6%)
534:544 (1%)
view
10 x 2 src/main/java/com/aws/logaggregator/model
src/main/java/com/aws/logaggregator/model
LogAggregatorMetadata.java
LogAggregatorMetadata.java
100:117 (17%)
123:140 (17%)
view
10 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-primary.yaml
369:378 (1%)
569:578 (1%)
view
10 x 2 automation/template
automation/template
log-aggregator-vpc.yaml
log-aggregator-vpc.yaml
296:305 (2%)
338:347 (2%)
view
10 x 2 automation/template
automation/template
log-aggregator-vpc.yaml
log-aggregator-vpc.yaml
268:277 (2%)
310:319 (2%)
view
10 x 2 automation/template
automation/template
log-aggregator-vpc.yaml
log-aggregator-vpc.yaml
282:291 (2%)
324:333 (2%)
view
10 x 2 automation/template
automation/template
log-aggregator-vpc.yaml
log-aggregator-vpc.yaml
372:381 (2%)
385:394 (2%)
view
9 x 2 automation/template
automation/template
log-aggregator-nginx.yaml
log-aggregator-primary.yaml
156:164 (5%)
358:366 (1%)
view
8 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-primary.yaml
330:337 (1%)
345:352 (1%)
view
8 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-secondary.yaml
345:352 (1%)
116:123 (6%)
view
8 x 2 automation/lambda/handlers
automation/lambda/handlers
index.py
ultrawarm.py
308:315 (2%)
123:130 (11%)
view
8 x 2 automation/template
automation/template
log-aggregator-nginx.yaml
log-aggregator-secondary.yaml
144:151 (4%)
116:123 (6%)
view
8 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-primary.yaml
359:366 (1%)
534:541 (1%)
view
8 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-secondary.yaml
534:541 (1%)
127:134 (6%)
view
8 x 2 automation/template
automation/template
log-aggregator-nginx.yaml
log-aggregator-secondary.yaml
157:164 (4%)
127:134 (6%)
view
8 x 2 automation/template
automation/template
log-aggregator-primary.yaml
log-aggregator-secondary.yaml
11:18 (1%)
18:25 (6%)
view