shadowsocks-android
Unit Size

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 338 units with 3,177 lines of code in units (24.5% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (170 lines of code)
    • 28 medium size units (885 lines of code)
    • 54 small units (804 lines of code)
    • 253 very small units (1,318 lines of code)
0% | 5% | 27% | 25% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
kt0% | 5% | 27% | 25% | 41%
py0% | 0% | 47% | 12% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Logical Component
primary logical decomposition
core0% | 11% | 19% | 32% | 36%
mobile0% | 0% | 36% | 18% | 44%
ROOT0% | 0% | 100% | 0% | 0%
tv0% | 0% | 18% | 22% | 59%
plugin0% | 0% | 0% | 26% | 74%
Legend:
101+
51-100
21-50
11-20
1-10
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
fun onStartCommand()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
62 11 3
override fun onStartCommand()
in core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt
57 6 3
suspend fun looper()
in core/src/main/java/com/github/shadowsocks/bg/GuardedProcessPool.kt
51 11 1
override fun onMenuItemClick()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
50 5 1
override fun onOptionsItemSelected()
in mobile/src/main/java/com/github/shadowsocks/AppManager.kt
45 7 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
suspend fun parse()
in core/src/main/java/com/github/shadowsocks/acl/Acl.kt
40 10 2
suspend fun init()
in core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt
37 5 1
override fun accept()
in core/src/main/java/com/github/shadowsocks/bg/LocalDnsWorker.kt
37 5 1
fun bind()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
37 10 1
override fun onCreatePreferences()
in mobile/src/main/java/com/github/shadowsocks/GlobalSettingsPreferenceFragment.kt
37 5 2
override fun onCreate()
in mobile/src/main/java/com/github/shadowsocks/AppManager.kt
35 2 1
fun init()
in core/src/main/java/com/github/shadowsocks/Core.kt
34 9 2
override fun onViewCreated()
in mobile/src/main/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
32 4 2
def main()
in translate.py
31 4 6
override fun onViewCreated()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
29 3 2
override fun onViewCreated()
in mobile/src/main/java/com/github/shadowsocks/AboutFragment.kt
29 2 2
override fun onCreate()
in mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
28 3 1
override fun startListeningForBandwidth()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
27 5 2
override fun onCreate()
in mobile/src/main/java/com/github/shadowsocks/tasker/ConfigActivity.kt
27 3 1
fun testConnection()
in core/src/main/java/com/github/shadowsocks/net/HttpsTest.kt
26 5 0
fun requestUpdate()
in core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
26 5 0
override fun toString()
in core/src/main/java/com/github/shadowsocks/acl/Acl.kt
26 3 0
override fun onCreatePreferences()
in tv/src/main/java/com/github/shadowsocks/tv/MainPreferenceFragment.kt
26 1 2
override fun onActivityResult()
in mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt
25 3 3
override fun onNavigationItemSelected()
in mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
24 2 1
override fun onViewCreated()
in mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt
24 1 2
def parse_gfwlist()
in core/gfwlist/parse.py
23 10 1
override fun onCreate()
in mobile/src/main/java/com/github/shadowsocks/UdpFallbackProfileActivity.kt
23 3 1
override fun acceptInternal()
in core/src/main/java/com/github/shadowsocks/bg/VpnService.kt
21 5 1
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/StatsBar.kt
20 3 1
fun listActive()
in core/src/main/java/com/github/shadowsocks/database/Profile.kt
19 2 0
fun serialize()
in core/src/main/java/com/github/shadowsocks/database/Profile.kt
19 1 0
fun deserialize()
in core/src/main/java/com/github/shadowsocks/database/Profile.kt
19 2 0
fun persistStats()
in core/src/main/java/com/github/shadowsocks/bg/TrafficMonitor.kt
19 4 1
fun changeState()
in mobile/src/main/java/com/github/shadowsocks/widget/ServiceButton.kt
19 5 3
fun remove()
in mobile/src/main/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
19 1 1
fun attach()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
18 5 0
fun move()
in mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
18 3 2
override fun onActivityResult()
in mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt
18 2 3
fun remove()
in mobile/src/main/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
18 3 1
override fun onActivityResult()
in mobile/src/main/java/com/github/shadowsocks/acl/CustomRulesFragment.kt
18 2 3
fun put()
in core/src/main/java/com/github/shadowsocks/database/KeyValuePair.kt
17 4 1
fun listAll()
in core/src/main/java/com/github/shadowsocks/database/Profile.kt
17 2 0
fun toString()
in core/src/main/java/com/github/shadowsocks/utils/Commandline.kt
17 3 1
fun killAll()
in core/src/main/java/com/github/shadowsocks/bg/Executable.kt
17 6 0
fun createNotification()
in core/src/main/java/com/github/shadowsocks/bg/BaseService.kt
17 7 1
suspend fun flatten()
in core/src/main/java/com/github/shadowsocks/acl/Acl.kt
17 7 2