awslabs / aws-lambda-powertools-java
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,571 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 54 duplicated lines
  • 3 duplicates
system2% (54 lines)
Duplication per Extension
java1% (42 lines)
yaml9% (12 lines)
Duplication per Component (primary)
example14% (42 lines)
powertools-logging1% (12 lines)
powertools-sqs0% (0 lines)
powertools-metrics0% (0 lines)
powertools-parameters0% (0 lines)
ROOT0% (0 lines)
powertools-validation0% (0 lines)
powertools-core0% (0 lines)
powertools-tracing0% (0 lines)
powertools-cloudformation0% (0 lines)
Longest Duplicates
The list of 3 longest duplicates.
See data for all 3 duplicates...
Size#FoldersFilesLinesCode
15 x 2 example/HelloWorldFuncti...rc/main/java/helloworld
example/HelloWorldFuncti...rc/main/java/helloworld
AppParams.java
AppValidation.java
55:71 (36%)
24:41 (68%)
view
6 x 2 example
example
template.yaml
template.yaml
25:30 (4%)
39:44 (4%)
view
6 x 2 powertools-logging/src/m...rtools/logging/internal
powertools-logging/src/m...rtools/logging/internal
AbstractJacksonLayoutCopy.java
LambdaJsonLayout.java
341:350 (2%)
224:233 (5%)
view