android / tv-samples
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
properties
pro
org
txt
  • 20 extensions are included in analyses: java, xml, kt, json, gradle, md, properties, gitignore, ts, pro, js, bat, yaml, py, html, org, yml, css, txt, sh
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (5 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (15 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (5 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 ".*\.d\.ts" (Typescript definition files) (2 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (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.

main18406 LOC (64%) 284 files
test2031 LOC (7%) 25 files
generated0 LOC (0%) 0 files
build and deployment682 LOC (2%) 19 files
other7399 LOC (25%) 174 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
org
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 284 files match defined criteria (18,406 lines of code, 100.0% vs. main code):
    • 203 *.java files (13,132 lines of code)
    • 64 *.kt files (3,524 lines of code)
    • 3 *.ts files (517 lines of code)
    • 3 *.py files (450 lines of code)
    • 1 *.css files (238 lines of code)
    • 2 *.org files (235 lines of code)
    • 3 *.html files (166 lines of code)
    • 4 *.js files (135 lines of code)
    • 1 *.yaml files (9 lines of code)
  • " *.java" is biggest, containing 71.35% of code.
  • " *.yaml" is smallest, containing 0.05% of code.


*.java13132 LOC (71%) 203 files
*.kt3524 LOC (19%) 64 files
*.ts517 LOC (2%) 3 files
*.py450 LOC (2%) 3 files
*.css238 LOC (1%) 1 files
*.org235 LOC (1%) 2 files
*.html166 LOC (<1%) 3 files
*.js135 LOC (<1%) 4 files
*.yaml9 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 25 files match defined criteria (2,031 lines of code, 11.0% vs. main code):
    • 21 *.kt files (1,687 lines of code)
    • 4 *.java files (344 lines of code)
  • " *.kt" is biggest, containing 83.06% of code.
  • " *.java" is smallest, containing 16.94% of code.


*.kt1687 LOC (83%) 21 files
*.java344 LOC (16%) 4 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 ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
  • 19 files match defined criteria (682 lines of code, 3.7% vs. main code):
    • 15 *.gradle files (428 lines of code)
    • 4 *.bat files (254 lines of code)
  • " *.gradle" is biggest, containing 62.76% of code.
  • " *.bat" is smallest, containing 37.24% of code.


*.gradle428 LOC (62%) 15 files
*.bat254 LOC (37%) 4 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 174 files match defined criteria (7,399 lines of code, 40.2% vs. main code):
    • 139 *.xml files (3,378 lines of code)
    • 18 *.json files (3,188 lines of code)
    • 11 *.md files (739 lines of code)
    • 6 *.properties files (94 lines of code)
  • " *.xml" is biggest, containing 45.65% of code.
  • " *.properties" is smallest, containing 1.27% of code.


*.xml3378 LOC (45%) 139 files
*.json3188 LOC (43%) 18 files
*.md739 LOC (9%) 11 files
*.properties94 LOC (1%) 6 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)
  • *.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)
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
    • 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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.org 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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
    • 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


2022-02-03 05:24