android / app-bundle-samples
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
  • 5% duplication:
    • 9,326 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 471 duplicated lines
  • 29 duplicates
system5% (471 lines)
Duplication per Extension
cpp10% (294 lines)
h9% (99 lines)
py6% (32 lines)
kts20% (16 lines)
fsh65% (15 lines)
vsh55% (15 lines)
Duplication per Component (primary)
PlayAssetDelivery/NativeSample5% (423 lines)
PlayAssetDelivery/BundletoolScriptSample4% (32 lines)
DynamicFeatureNavigation/XML26% (16 lines)
DynamicFeatures/features0% (0 lines)
PlayCoreKtx/buildSrc0% (0 lines)
InstantApps/cookie-api0% (0 lines)
InstantApps/multi-feature-module0% (0 lines)
InstantApps/analytics0% (0 lines)
InstantApps/service0% (0 lines)
InstantApps/storage-api0% (0 lines)
DynamicFeatureNavigation/DSL0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 29 duplicates...
Size#FoldersFilesLinesCode
33 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
vecmath.cpp
vecmath.h
60:95 (10%)
672:707 (5%)
view
20 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
307:329 (4%)
358:380 (4%)
view
18 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
vecmath.h
vecmath.h
896:914 (2%)
922:940 (2%)
view
16 x 2 PlayAssetDelivery/BundletoolScriptSample
PlayAssetDelivery/BundletoolScriptSample
add_packs.py
add_packs.py
435:453 (4%)
503:521 (4%)
view
15 x 2 PlayAssetDelivery/Native...src/main/assets/Shaders
PlayAssetDelivery/Native...src/main/assets/Shaders
fsh
2DTexture.fsh
2DTexture.vsh
1:15 (65%)
1:15 (55%)
view
13 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
243:257 (2%)
354:368 (2%)
view
12 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
tapCamera.cpp
tapCamera.cpp
89:109 (6%)
130:150 (6%)
view
11 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
GLContext.cpp
GLContext.cpp
96:106 (7%)
117:127 (7%)
view
11 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
247:257 (2%)
307:317 (2%)
view
9 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
260:271 (1%)
318:329 (1%)
view
9 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
260:271 (1%)
369:380 (1%)
view
9 x 2 PlayAssetDelivery/NativeSample/Teapot/src/main/cpp
PlayAssetDelivery/NativeSample/Teapot/src/main/cpp
PlayAssetDeliveryUtil.cpp
PlayAssetDeliveryUtil.cpp
38:48 (6%)
60:70 (6%)
view
9 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
221:233 (1%)
339:351 (1%)
view
9 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
vecmath.h
vecmath.h
375:388 (1%)
593:606 (1%)
view
8 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
288:299 (1%)
340:351 (1%)
view
8 x 2 DynamicFeatureNavigation/XML/dynamicfeature
DynamicFeatureNavigation/XML/includedgraphfeature
build.gradle.kts
build.gradle.kts
17:28 (66%)
17:28 (66%)
view
8 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
222:233 (1%)
288:299 (1%)
view
7 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
553:561 (1%)
602:610 (1%)
view
7 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
394:404 (1%)
440:450 (1%)
view
7 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
198:209 (1%)
394:404 (1%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 PlayAssetDelivery/NativeSample/Teapot/src/main/cpp
PlayAssetDelivery/NativeSample/Teapot/src/main/cpp
PlayAssetDeliveryUtil.cpp
PlayAssetDeliveryUtil.cpp
32:49 
54:71 
view
12 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
JNIHelper.cpp
JNIHelper.cpp
468:481 
483:496 
view
6 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
gestureDetector.cpp
gestureDetector.cpp
128:134 
224:230 
view
6 x 2 PlayAssetDelivery/NativeSample/common/ndk_helper
PlayAssetDelivery/NativeSample/common/ndk_helper
vecmath.h
vecmath.h
380:386 
598:604 
view