android / performance-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
  • 11% duplication:
    • 988 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 112 duplicated lines
  • 6 duplicates
system11% (112 lines)
Duplication per Extension
pro98% (56 lines)
kt11% (56 lines)
Duplication per Component (primary)
JankStatsSample/app/src/main15% (32 lines)
BenchmarkSample/benchmark100% (28 lines)
BenchmarkNdkSample/benchmark100% (28 lines)
MacrobenchmarkSample/macrobenchmark/src/main17% (24 lines)
BenchmarkSample/ui/src/main0% (0 lines)
ConstraintLayoutPerformance/app/src/main0% (0 lines)
MacrobenchmarkSample/macrobenchmark0% (0 lines)
MacrobenchmarkSample/functions/src0% (0 lines)
BenchmarkNdkSample/benchmark/cpp/googlebenchmarkrunner0% (0 lines)
BenchmarkNdkSample/benchmark/cpp/benchmark0% (0 lines)

Duplication Between Components (50+ lines)

G BenchmarkNdkSample/benchmark BenchmarkNdkSample/benchmark BenchmarkSample/benchmark BenchmarkSample/benchmark BenchmarkNdkSample/benchmark--BenchmarkSample/benchmark 56

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
28 x 2 BenchmarkNdkSample/benchmark
BenchmarkSample/benchmark
pro
benchmark-proguard-rules.pro
benchmark-proguard-rules.pro
1:37 (100%)
1:37 (100%)
view
9 x 2 JankStatsSample/app/src/...a/com/example/jankstats
JankStatsSample/app/src/...a/com/example/jankstats
JankAggregatorActivity.kt
JankLoggingActivity.kt
88:100 (20%)
92:104 (20%)
view
8 x 2 MacrobenchmarkSample/mac.../macrobenchmark/startup
MacrobenchmarkSample/mac.../macrobenchmark/startup
SmallListStartupBenchmark.kt
StartupBenchmarkParametrizedStartupMo...
33:41 (30%)
32:40 (30%)
view
7 x 2 JankStatsSample/app/src/...a/com/example/jankstats
JankStatsSample/app/src/...a/com/example/jankstats
JankAggregatorActivity.kt
JankLoggingActivity.kt
56:66 (16%)
50:63 (16%)
view
7 x 2 MacrobenchmarkSample/mac.../macrobenchmark/startup
MacrobenchmarkSample/mac.../macrobenchmark/startup
SampleStartupBenchmark.kt
SmallListStartupBenchmark.kt
32:39 (53%)
35:42 (26%)
view
6 x 2 MacrobenchmarkSample/mac.../macrobenchmark/startup
MacrobenchmarkSample/mac.../macrobenchmark/startup
SampleStartupBenchmark.kt
StartupBenchmarkParametrizedStartupMo...
32:38 (46%)
34:40 (23%)
view