shadowsocks-android
Source Code Overview

Source Code Analysis Scope
Files includes and excluded from analyses
  • 16 extensions are included in analyses: xml, kt, md, json, gradle, yml, h, py, properties, java, bat, sh, html, c, txt, pl
  • 1 criterion is used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (0 files).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main12959 LOC (77%) 243 files
other3463 LOC (20%) 7 files
build and deployment351 LOC (2%) 7 files
test53 LOC (<1%) 2 files
generated0 LOC (0%) 0 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 243 files match defined criteria (12,959 lines of code, 100.0% vs. main code):
    • 101 *.kt files (7,632 lines of code)
    • 125 *.xml files (3,642 lines of code)
    • 7 *.json files (894 lines of code)
    • 1 *.yml files (525 lines of code)
    • 4 *.py files (186 lines of code)
    • 3 *.properties files (39 lines of code)
    • 1 *.html files (31 lines of code)
    • 1 *.pl files (10 lines of code)
  • " *.kt" is biggest, containing 58.89% of code.
  • " *.pl" is smallest, containing 0.08% of code.


*.kt7632 LOC (58%) 101 files
*.xml3642 LOC (28%) 125 files
*.json894 LOC (6%) 7 files
*.yml525 LOC (4%) 1 files
*.py186 LOC (1%) 4 files
*.properties39 LOC (<1%) 3 files
*.html31 LOC (<1%) 1 files
*.pl10 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
  • The following criteria are used to filter files:
    • files with paths like ".*/test/.*".
  • 2 files match defined criteria (53 lines of code, 0.4% vs. main code). All matches are in *.kt files.


*.kt53 LOC (100%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
  • The following criteria are used to filter files:
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
  • 7 files match defined criteria (351 lines of code, 2.7% vs. main code):
    • 4 *.xml files (266 lines of code)
    • 1 *.bat files (68 lines of code)
    • 2 *.sh files (17 lines of code)
  • " *.xml" is biggest, containing 75.78% of code.
  • " *.sh" is smallest, containing 4.84% of code.


*.xml266 LOC (75%) 4 files
*.bat68 LOC (19%) 1 files
*.sh17 LOC (4%) 2 files
Other Code
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
  • 7 files match defined criteria (3,463 lines of code, 26.7% vs. main code):
    • 1 *.txt files (2,932 lines of code)
    • 6 *.md files (531 lines of code)
  • " *.txt" is biggest, containing 84.67% of code.
  • " *.md" is smallest, containing 15.33% of code.


*.txt2932 LOC (84%) 1 files
*.md531 LOC (15%) 6 files
Analyzers
Info about analyzers used for source code examinations.
  • *.kt files are analyzed with KotlinAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis (based on imports and package statements)
  • *.xml files are analyzed with XmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.json files are analyzed with JsonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.py files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.properties files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.pl files are analyzed with PerlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis


2020-09-12 21:39