awslabs / aws-c-cal
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
  • 10% duplication:
    • 3,010 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 304 duplicated lines
  • 30 duplicates
system10% (304 lines)
Duplication per Extension
c10% (280 lines)
cmake16% (24 lines)
Duplication per Component (primary)
source/unix18% (149 lines)
source/darwin14% (80 lines)
source/windows9% (51 lines)
cmake/modules17% (24 lines)
cmake0% (0 lines)
source0% (0 lines)
include/aws/cal0% (0 lines)
include/aws/cal/private0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 30 duplicates...
Size#FoldersFilesLinesCode
12 x 2 cmake/modules
cmake/modules
cmake
FindLibCrypto.cmake
FindLibCrypto.cmake
37:48 (11%)
51:62 (11%)
view
9 x 2 source/windows
source/windows
bcrypt_ecc.c
bcrypt_ecc.c
270:282 (2%)
383:395 (2%)
view
9 x 2 source/unix
source/unix
openssl_platform_init.c
openssl_platform_init.c
336:346 (2%)
375:386 (2%)
view
9 x 2 source/darwin
source/windows
securityframework_ecc.c
bcrypt_ecc.c
506:515 (2%)
455:464 (2%)
view
8 x 2 source/unix
source/unix
openssl_platform_init.c
openssl_platform_init.c
157:164 (2%)
204:211 (2%)
view
8 x 2 source/unix
source/unix
openssl_platform_init.c
openssl_platform_init.c
131:140 (2%)
221:230 (2%)
view
8 x 2 source/darwin
source/unix
commoncrypto_hmac.c
opensslcrypto_hmac.c
9:17 (17%)
11:19 (13%)
view
7 x 2 source/darwin
source/darwin
commoncrypto_md5.c
commoncrypto_sha256.c
12:19 (15%)
9:16 (15%)
view
7 x 2 source/unix
source/unix
opensslcrypto_hash.c
opensslcrypto_hash.c
62:69 (6%)
120:127 (6%)
view
7 x 2 source/darwin
source/darwin
commoncrypto_sha1.c
commoncrypto_sha256.c
10:17 (15%)
9:16 (15%)
view
7 x 2 source/darwin
source/darwin
commoncrypto_md5.c
commoncrypto_sha1.c
12:19 (15%)
10:17 (15%)
view
7 x 2 source/unix
source/unix
openssl_platform_init.c
openssl_platform_init.c
325:331 (1%)
364:370 (1%)
view
7 x 2 source/unix
source/unix
opensslcrypto_hash.c
opensslcrypto_hash.c
91:98 (6%)
120:127 (6%)
view
7 x 2 source/unix
source/unix
opensslcrypto_ecc.c
opensslcrypto_ecc.c
171:178 (2%)
196:203 (2%)
view
7 x 2 source/unix
source/unix
opensslcrypto_hash.c
opensslcrypto_hash.c
62:69 (6%)
91:98 (6%)
view
6 x 2 source/unix
source/unix
opensslcrypto_ecc.c
opensslcrypto_ecc.c
198:203 (2%)
244:249 (2%)
view
6 x 2 source/unix
source/unix
opensslcrypto_ecc.c
opensslcrypto_ecc.c
173:178 (2%)
244:249 (2%)
view
6 x 2 source/darwin
source/darwin
securityframework_ecc.c
securityframework_ecc.c
148:154 (1%)
355:361 (1%)
view
6 x 2 source/windows
source/windows
bcrypt_ecc.c
bcrypt_ecc.c
210:217 (1%)
224:231 (1%)
view
6 x 2 source/darwin
source/windows
securityframework_ecc.c
bcrypt_ecc.c
425:430 (1%)
455:460 (1%)
view