awslabs / aws-crt-swift
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:
    • 3,499 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 76 duplicated lines
  • 7 duplicates
system2% (76 lines)
Duplication per Extension
swift2% (76 lines)
Duplication per Component (primary)
Source/AwsCommonRuntimeKit/crt6% (42 lines)
Source/AwsCommonRuntimeKit/mqtt9% (34 lines)
Source/Elasticurl0% (0 lines)
Source/AwsCommonRuntimeKit/sdkutils0% (0 lines)
Source/AwsCommonRuntimeKit/auth0% (0 lines)
Source/AwsCommonRuntimeKit0% (0 lines)
Source/AwsCommonRuntimeKit/io0% (0 lines)
Source/AwsCommonRuntimeKit/http0% (0 lines)
Source/LibCrypto0% (0 lines)
aws-common-runtime/config/aws0% (0 lines)
aws-common-runtime/config0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
10 x 2 Source/AwsCommonRuntimeKit/mqtt
Source/AwsCommonRuntimeKit/mqtt
MqttConnection.swift
MqttConnection.swift
371:382 (3%)
410:422 (3%)
view
7 x 2 Source/AwsCommonRuntimeKit/mqtt
Source/AwsCommonRuntimeKit/mqtt
MqttClient.swift
MqttClient.swift
32:38 (21%)
54:60 (21%)
view
6 x 2 Source/AwsCommonRuntimeKit/crt
Source/AwsCommonRuntimeKit/crt
ByteBuffer.swift
ByteBuffer.swift
87:94 (2%)
98:105 (2%)
view
6 x 2 Source/AwsCommonRuntimeKit/crt
Source/AwsCommonRuntimeKit/crt
Future.swift
Future.swift
39:44 (8%)
53:58 (8%)
view
6 x 2 Source/AwsCommonRuntimeKit/crt
Source/AwsCommonRuntimeKit/crt
ByteBuffer.swift
ByteBuffer.swift
120:127 (2%)
131:138 (2%)
view
6 x 2 Source/AwsCommonRuntimeKit/crt
Source/AwsCommonRuntimeKit/crt
ByteBuffer.swift
ByteBuffer.swift
87:94 (2%)
109:116 (2%)
view
6 x 2 Source/AwsCommonRuntimeKit/crt
Source/AwsCommonRuntimeKit/crt
ByteBuffer.swift
ByteBuffer.swift
98:105 (2%)
109:116 (2%)
view