shadowsocks-android
Conditional Complexity

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 338 units with 3,177 lines of code in units (24.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (113 lines of code)
    • 18 simple units (463 lines of code)
    • 318 very simple units (2,601 lines of code)
0% | 0% | 3% | 14% | 81%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
kt0% | 0% | 3% | 14% | 81%
py0% | 0% | 0% | 20% | 79%
Legend:
51+
26-50
11-25
6-10
1-5
Conditional Complexity per Logical Component
primary logical decomposition
core0% | 0% | 7% | 18% | 73%
mobile0% | 0% | 0% | 11% | 88%
plugin0% | 0% | 0% | 26% | 74%
ROOT0% | 0% | 0% | 0% | 100%
tv0% | 0% | 0% | 0% | 100%
Legend:
51+
26-50
11-25
6-10
1-5
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
fun onStartCommand()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
62 11 3
suspend fun looper()
in core/src/main/java/com/github/shadowsocks/bg/GuardedProcessPool.kt
51 11 1
def parse_gfwlist()
in core/gfwlist/parse.py
23 10 1
suspend fun parse()
in core/src/main/java/com/github/shadowsocks/acl/Acl.kt
40 10 2
fun bind()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
37 10 1
fun init()
in core/src/main/java/com/github/shadowsocks/Core.kt
34 9 2
fun createNotification()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
17 7 1
override fun log()
in core/src/main/java/com/github/shadowsocks/Core.kt
9 7 4
suspend fun flatten()
in core/src/main/java/com/github/shadowsocks/acl/Acl.kt
17 7 2
override fun onOptionsItemSelected()
in mobile/src/main/java/com/github/shadowsocks/AppManager.kt
45 7 1
fun finalize()
in core/src/main/java/com/github/shadowsocks/database/Profile.kt
12 6 1
fun disconnect()
in core/src/main/java/com/github/shadowsocks/aidl/ShadowsocksConnection.kt
16 6 1
fun matches()
in core/src/main/java/com/github/shadowsocks/net/Subnet.kt
9 6 1
override fun onStartCommand()
in core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt
57 6 3
fun killAll()
in core/src/main/java/com/github/shadowsocks/bg/Executable.kt
17 6 0
fun forceLoad()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
15 6 0
suspend fun startProcesses()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
16 6 0
fun toString()
in plugin/src/main/java/com/github/shadowsocks/plugin/PluginOptions.kt
13 6 1
override fun onCreatePreferences()
in mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt
43 6 2
fun populateUnifiedNativeAdView()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
43 6 2
def add_domain_to_set()
in core/gfwlist/parse.py
9 5 2
open fun shutdown()
in core/src/main/java/com/github/shadowsocks/net/LocalSocketListener.kt
11 5 1
fun testConnection()
in core/src/main/java/com/github/shadowsocks/net/HttpsTest.kt
26 5 0
fun init()
in core/src/main/java/com/github/shadowsocks/plugin/PluginManager.kt
11 5 1
override fun acceptInternal()
in core/src/main/java/com/github/shadowsocks/bg/VpnService.kt
21 5 1
suspend fun init()
in core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
37 5 1
fun requestUpdate()
in core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
26 5 0
override fun startListeningForBandwidth()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
27 5 2
override fun accept()
in core/src/main/java/com/github/shadowsocks/bg/LocalDnsWorker.kt
37 5 1
override fun onReceive()
in core/src/main/java/com/github/shadowsocks/BootReceiver.kt
12 5 2
fun fromAcl()
in core/src/main/java/com/github/shadowsocks/acl/Acl.kt
12 5 1
override fun onBindViewHolder()
in tv/src/main/java/com/github/shadowsocks/tv/ProfilesDialogFragment.kt
12 5 2
override fun onPreferenceDisplayDialog()
in tv/src/main/java/com/github/shadowsocks/tv/MainFragment.kt
20 5 2
fun changeState()
in mobile/src/main/java/com/github/shadowsocks/widget/ServiceButton.kt
19 5 3
override fun analyze()
in mobile/src/main/java/com/github/shadowsocks/ScannerActivity.kt
17 5 1
fun attach()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
18 5 0
override fun onMenuItemClick()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
50 5 1
override fun onCreatePreferences()
in mobile/src/main/java/com/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
37 5 2
def main()
in translate.py
31 4 6
def get_hostname()
in core/gfwlist/parse.py
9 4 1
fun put()
in core/src/main/java/com/github/shadowsocks/database/KeyValuePair.kt
17 4 1
fun delete()
in core/src/main/java/com/github/shadowsocks/database/KeyValuePair.kt
15 4 1
fun ensureNotEmpty()
in core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt
11 4 0
fun toUri()
in core/src/main/java/com/github/shadowsocks/database/Profile.kt
14 4 0
override fun onServiceConnected()
in core/src/main/java/com/github/shadowsocks/aidl/ShadowsocksConnection.kt
13 4 2
override fun toString()
in core/src/main/java/com/github/shadowsocks/plugin/PluginConfiguration.kt
6 4 0
fun initGlobal()
in core/src/main/java/com/github/shadowsocks/preference/DataStore.kt
6 4 0
override fun acceptInternal()
in core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
13 4 1
fun persistStats()
in core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
19 4 1
override fun equals()
in plugin/src/main/java/com/github/shadowsocks/plugin/PluginOptions.kt
4 4 1