awslabs / smithy-typescript
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
  • 7% duplication:
    • 8,523 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 676 duplicated lines
  • 54 duplicates
system7% (676 lines)
Duplication per Extension
java8% (662 lines)
ts2% (14 lines)
Duplication per Component (primary)
smithy-typescript-codegen/src/main/java8% (662 lines)
smithy-typescript-ssdk-libs/server-common/src/validation4% (14 lines)
smithy-typescript-codegen-test0% (0 lines)
smithy-typescript-ssdk-libs/server-common/src0% (0 lines)
smithy-typescript-ssdk-libs/server-common/src/httpbinding0% (0 lines)
smithy-typescript-ssdk-libs/server-common0% (0 lines)
smithy-typescript-ssdk-libs0% (0 lines)
smithy-typescript-ssdk-libs/server-apigateway/src0% (0 lines)
smithy-typescript-ssdk-libs/server-apigateway0% (0 lines)
ROOT0% (0 lines)
smithy-typescript-codegen/src/main/resources0% (0 lines)
smithy-typescript-codegen0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 54 duplicates...
Size#FoldersFilesLinesCode
34 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
HttpProtocolTestGenerator.java
HttpProtocolTestGenerator.java
987:1038 (4%)
1208:1260 (4%)
view
21 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
HttpProtocolTestGenerator.java
HttpProtocolTestGenerator.java
1110:1133 (2%)
1311:1334 (2%)
view
15 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
DocumentMemberDeserVisitor.java
DocumentMemberSerVisitor.java
203:225 (12%)
195:217 (15%)
view
12 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
DocumentShapeDeserVisitor.java
DocumentShapeSerVisitor.java
311:353 (19%)
307:350 (19%)
view
12 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
CommandGenerator.java
ServerCommandGenerator.java
218:231 (5%)
95:109 (7%)
view
12 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
CommandGenerator.java
ServerCommandGenerator.java
310:324 (5%)
246:260 (7%)
view
11 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
PaginationGenerator.java
WaiterGenerator.java
134:146 (7%)
204:216 (7%)
view
9 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
HttpBindingProtocolGenerator.java
HttpRpcProtocolGenerator.java
2041:2053 (<1%)
370:382 (4%)
view
9 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
DocumentMemberDeserVisitor.java
DocumentMemberSerVisitor.java
83:97 (7%)
82:96 (9%)
view
9 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
HttpProtocolTestGenerator.java
HttpProtocolTestGenerator.java
1064:1072 (1%)
1269:1277 (1%)
view
8 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
DocumentMemberDeserVisitor.java
DocumentMemberSerVisitor.java
112:136 (6%)
104:128 (8%)
view
8 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
HttpBindingProtocolGenerator.java
HttpBindingProtocolGenerator.java
483:490 (<1%)
1989:1996 (<1%)
view
8 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
HttpBindingProtocolGenerator.java
HttpBindingProtocolGenerator.java
1612:1620 (<1%)
2542:2550 (<1%)
view
8 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
TypeScriptJmesPathVisitor.java
TypeScriptJmesPathVisitor.java
285:294 (3%)
302:312 (3%)
view
8 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
ServerGenerator.java
ServerGenerator.java
79:86 (3%)
160:167 (3%)
view
7 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
HttpBindingProtocolGenerator.java
HttpBindingProtocolGenerator.java
1678:1684 (<1%)
2036:2042 (<1%)
view
7 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
AddChecksumRequiredDependency.java
AddDefaultsModeDependency.java
45:51 (8%)
30:36 (43%)
view
7 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
AddChecksumRequiredDependency.java
AddEventStreamDependency.java
45:51 (8%)
54:60 (10%)
view
7 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
ServiceAggregatedClientGenerator.java
ServiceBareBonesClientGenerator.java
55:61 (9%)
70:76 (3%)
view
7 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
CommandGenerator.java
ServerCommandGenerator.java
239:247 (3%)
135:143 (4%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
22 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
HttpProtocolTestGenerator.java
HttpProtocolTestGenerator.java
1111:1134 
1312:1335 
view
14 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
HttpProtocolTestGenerator.java
HttpProtocolTestGenerator.java
988:1006 
1209:1227 
view
8 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
CommandGenerator.java
ServerCommandGenerator.java
239:249 
135:145 
view
8 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
DocumentMemberDeserVisitor.java
DocumentMemberSerVisitor.java
82:90 
81:89 
view
7 x 2 smithy-typescript-codege...ithy/typescript/codegen
smithy-typescript-codege...ithy/typescript/codegen
HttpProtocolTestGenerator.java
HttpProtocolTestGenerator.java
1022:1031 
1244:1253 
view
6 x 2 smithy-typescript-ssdk-l...r-common/src/validation
smithy-typescript-ssdk-l...r-common/src/validation
validators.ts
validators.ts
183:189 
229:235 
view
6 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
TypeScriptIntegration.java
TypeScriptIntegration.java
190:197 
257:264 
view
6 x 2 smithy-typescript-codege...ipt/codegen/integration
smithy-typescript-codege...ipt/codegen/integration
HttpBindingProtocolGenerator.java
HttpBindingProtocolGenerator.java
2351:2357 
2371:2377 
view