android / android-test
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
txt
proto
cfg
properties
  • 16 extensions are included in analyses: java, xml, txt, kt, bzl, html, py, proto, cfg, md, properties, sh, yml, gitignore, json, yaml
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (86 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main16073 LOC (15%) 132 files
test80171 LOC (79%) 1035 files
generated0 LOC (0%) 0 files
build and deployment79 LOC (<1%) 2 files
other4176 LOC (4%) 176 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 132 files match defined criteria (16,073 lines of code, 100.0% vs. main code):
    • 95 *.java files (10,047 lines of code)
    • 10 *.py files (4,170 lines of code)
    • 20 *.bzl files (1,691 lines of code)
    • 1 *.proto files (81 lines of code)
    • 4 *.cfg files (54 lines of code)
    • 1 *.yaml files (18 lines of code)
    • 1 *.yml files (12 lines of code)
  • " *.java" is biggest, containing 62.51% of code.
  • " *.yml" is smallest, containing 0.07% of code.


*.java10047 LOC (62%) 95 files
*.py4170 LOC (25%) 10 files
*.bzl1691 LOC (10%) 20 files
*.proto81 LOC (<1%) 1 files
*.cfg54 LOC (<1%) 4 files
*.yaml18 LOC (<1%) 1 files
*.yml12 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 1035 files match defined criteria (80,171 lines of code, 498.8% vs. main code):
    • 927 *.java files (75,622 lines of code)
    • 51 *.kt files (1,683 lines of code)
    • 7 *.py files (1,447 lines of code)
    • 15 *.proto files (714 lines of code)
    • 9 *.bzl files (491 lines of code)
    • 18 *.html files (188 lines of code)
    • 7 *.cfg files (21 lines of code)
    • 1 *.sh files (5 lines of code)
  • " *.java" is biggest, containing 94.33% of code.
  • " *.sh" is smallest, containing 0.01% of code.


*.java75622 LOC (94%) 927 files
*.kt1683 LOC (2%) 51 files
*.py1447 LOC (1%) 7 files
*.proto714 LOC (<1%) 15 files
*.bzl491 LOC (<1%) 9 files
*.html188 LOC (<1%) 18 files
*.cfg21 LOC (<1%) 7 files
*.sh5 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 2 files match defined criteria (79 lines of code, 0.5% vs. main code). All matches are in *.sh files.


*.sh79 LOC (100%) 2 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 176 files match defined criteria (4,176 lines of code, 26.0% vs. main code):
    • 159 *.xml files (3,609 lines of code)
    • 8 *.html files (410 lines of code)
    • 5 *.md files (146 lines of code)
    • 4 *.properties files (11 lines of code)
  • " *.xml" is biggest, containing 86.42% of code.
  • " *.properties" is smallest, containing 0.26% of code.


*.xml3609 LOC (86%) 159 files
*.html410 LOC (9%) 8 files
*.md146 LOC (3%) 5 files
*.properties11 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.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
  • *.bzl 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
  • *.proto 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.yaml 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
  • *.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


2022-02-03 05:23