android / architecture-components-samples
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 465 units with 3,399 lines of code in units (42.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 0 simple units (0 lines of code)
    • 465 very simple units (3,399 lines of code)
0% | 0% | 0% | 0% | 100%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
kt0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
PersistenceMigrationsSample0% | 0% | 0% | 0% | 100%
GithubBrowserSample0% | 0% | 0% | 0% | 100%
BasicSample0% | 0% | 0% | 0% | 100%
PagingWithNetworkSample0% | 0% | 0% | 0% | 100%
WorkManagerSample0% | 0% | 0% | 0% | 100%
PersistenceContentProviderSample0% | 0% | 0% | 0% | 100%
NavigationBasicSample0% | 0% | 0% | 0% | 100%
BasicRxJavaSample0% | 0% | 0% | 0% | 100%
PagingSample0% | 0% | 0% | 0% | 100%
NavigationAdvancedSample0% | 0% | 0% | 0% | 100%
BasicRxJavaSampleKotlin0% | 0% | 0% | 0% | 100%
WorkManagerMultiprocessSample0% | 0% | 0% | 0% | 100%
ViewBindingSample0% | 0% | 0% | 0% | 100%
LiveDataSample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fun create()
in GithubBrowserSample/app/src/main/java/com/android/example/github/api/ApiResponse.kt
21 5 1
override fun areItemsTheSame()
in PagingSample/app/src/main/java/paging/android/example/com/pagingsample/CheeseAdapter.kt
9 5 2
public void setProductList()
in BasicSample/app/src/main/java/com/example/android/persistence/ui/ProductAdapter.java
33 5 1
override suspend fun load()
in PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/repository/inMemory/byItem/ItemKeyedSubredditPagingSource.kt
19 5 1
override suspend fun load()
in PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/repository/inMemory/byPage/PageKeyedSubredditPagingSource.kt
19 5 1
override suspend fun load()
in PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/repository/inDb/PageKeyedRemoteMediator.kt
43 5 2
public User getUser()
in PersistenceMigrationsSample/app/src/sqlite/java/com/example/android/persistence/migrations/LocalUserDataSource.java
22 5 0
public static Cheese fromContentValues()
in PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/data/Cheese.java
10 5 1
public Cursor query()
in PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/provider/SampleContentProvider.java
21 5 5
public int bulkInsert()
in PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/provider/SampleContentProvider.java
19 5 2
fun drainTasks()
in GithubBrowserSample/app/src/test-common/java/com/android/example/github/util/CountingAppExecutors.kt
17 4 2
override fun get()
in GithubBrowserSample/app/src/main/java/com/android/example/github/util/LiveDataCallAdapterFactory.kt
19 4 3
override fun run()
in GithubBrowserSample/app/src/main/java/com/android/example/github/repository/FetchNextSearchPageTask.kt
40 4 0
public boolean areContentsTheSame()
in BasicSample/app/src/main/java/com/example/android/persistence/ui/CommentAdapter.java
7 4 2
override fun doWork()
in WorkManagerSample/lib/src/main/java/com/example/background/workers/UploadWorker.kt
29 4 0
public Uri insert()
in PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/provider/SampleContentProvider.java
17 4 2
public int delete()
in PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/provider/SampleContentProvider.java
18 4 3
public int update()
in PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/provider/SampleContentProvider.java
20 4 4
fun retry()
in GithubBrowserSample/app/src/main/java/com/android/example/github/ui/repo/RepoViewModel.kt
7 3 0
fun ifExists()
in GithubBrowserSample/app/src/main/java/com/android/example/github/ui/repo/RepoViewModel.kt
7 3 2