GerritCodeReview / plugins_lfs
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 153 units with 1,175 lines of code in units (47.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (96 lines of code)
    • 3 simple units (96 lines of code)
    • 148 very simple units (983 lines of code)
0% | 0% | 8% | 8% | 83%
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
java0% | 0% | 8% | 8% | 83%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/java/com/googlesource/gerrit/plugins/lfs0% | 0% | 24% | 6% | 69%
src/main/java/com/googlesource/gerrit/plugins/lfs/locks0% | 0% | 0% | 18% | 81%
src/main/java/com/googlesource/gerrit/plugins/lfs/auth0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/lfs/fs0% | 0% | 0% | 0% | 100%
gr-lfs0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/lfs/s30% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/lfs/PutLfsGlobalConfig.java
56 14 2
protected LargeFileRepository getLargeFileRepository()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
40 14 3
public LfsProjectConfigSection getForProject()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsProjectsConfig.java
24 10 1
public void run()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksAction.java
25 7 0
LfsLock createLock()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsProjectLocks.java
47 6 2
public CurrentUser getUser()
in src/main/java/com/googlesource/gerrit/plugins/lfs/auth/LfsAuthUserProvider.java
14 5 3
public String authenticate()
in src/main/java/com/googlesource/gerrit/plugins/lfs/auth/LfsSshAuth.java
32 5 2
void load()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsProjectLocks.java
25 5 0
LfsLockResponse deleteLock()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsLocksHandler.java
22 5 4
private void authorizeUser()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsApiServlet.java
18 5 3
protected void doHead()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsContentServlet.java
15 4 2
private Optional validateGetRequest()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsContentServlet.java
23 4 2
public Path getForBackend()
in src/main/java/com/googlesource/gerrit/plugins/lfs/fs/LfsFsDataDirectoryManager.java
15 4 2
void deleteLock()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsProjectLocks.java
32 4 1
protected String getProjectName()
in src/main/java/com/googlesource/gerrit/plugins/lfs/locks/LfsPutLocksAction.java
19 4 0
public LargeFileRepository get()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsRepositoryResolver.java
22 4 2
_getPreferences()
in gr-lfs/gr-lfs-project-info.js
12 3 0
public void validate()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsAdminView.java
6 3 1
public List getConfigSections()
in src/main/java/com/googlesource/gerrit/plugins/lfs/LfsProjectsConfig.java
11 3 0
Optional getUserFromValidToken()
in src/main/java/com/googlesource/gerrit/plugins/lfs/auth/LfsSshRequestAuthorizer.java
12 3 3