android / app-bundle-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
txt
vsh
inl
proto
fsh
  • 24 extensions are included in analyses: xml, kt, gradle, properties, java, md, h, cpp, bat, gitignore, pro, yaml, txt, kts, py, markdown, vsh, sh, json, yml, c, inl, proto, fsh
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (7 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (26 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (16 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (1 file).
    • exclude files with path like ".*/proguard[.]pro" (ProGuard) (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 ".*[.]txt" (Text files) (5 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.

main10542 LOC (51%) 71 files
test156 LOC (<1%) 3 files
generated0 LOC (0%) 0 files
build and deployment2204 LOC (10%) 76 files
other7638 LOC (37%) 280 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
inl
proto
vsh
fsh
pro
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 71 files match defined criteria (10,542 lines of code, 100.0% vs. main code):
    • 1 *.inl files (3,596 lines of code)
    • 15 *.cpp files (3,073 lines of code)
    • 20 *.java files (1,488 lines of code)
    • 15 *.h files (1,351 lines of code)
    • 3 *.py files (507 lines of code)
    • 1 *.proto files (171 lines of code)
    • 7 *.kt files (153 lines of code)
    • 5 *.kts files (110 lines of code)
    • 1 *.c files (39 lines of code)
    • 1 *.vsh files (27 lines of code)
    • 1 *.fsh files (23 lines of code)
    • 1 *.pro files (4 lines of code)
  • " *.inl" is biggest, containing 34.11% of code.
  • " *.pro" is smallest, containing 0.04% of code.


*.inl3596 LOC (34%) 1 files
*.cpp3073 LOC (29%) 15 files
*.java1488 LOC (14%) 20 files
*.h1351 LOC (12%) 15 files
*.py507 LOC (4%) 3 files
*.proto171 LOC (1%) 1 files
*.kt153 LOC (1%) 7 files
*.kts110 LOC (1%) 5 files
*.c39 LOC (<1%) 1 files
*.vsh27 LOC (<1%) 1 files
*.fsh23 LOC (<1%) 1 files
*.pro4 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 any line of content like ".*/simpletest/.*".
  • 3 files match defined criteria (156 lines of code, 1.5% vs. main code):
    • 2 *.java files (125 lines of code)
    • 1 *.kt files (31 lines of code)
  • " *.java" is biggest, containing 80.13% of code.
  • " *.kt" is smallest, containing 19.87% of code.


*.java125 LOC (80%) 2 files
*.kt31 LOC (19%) 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 76 files match defined criteria (2,204 lines of code, 20.9% vs. main code):
    • 61 *.gradle files (1,287 lines of code)
    • 14 *.bat files (899 lines of code)
    • 1 *.sh files (18 lines of code)
  • " *.gradle" is biggest, containing 58.39% of code.
  • " *.sh" is smallest, containing 0.82% of code.


*.gradle1287 LOC (58%) 61 files
*.bat899 LOC (40%) 14 files
*.sh18 LOC (<1%) 1 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 280 files match defined criteria (7,638 lines of code, 72.5% vs. main code):
    • 183 *.xml files (4,071 lines of code)
    • 56 *.kt files (1,955 lines of code)
    • 18 *.md files (668 lines of code)
    • 7 *.java files (512 lines of code)
    • 14 *.properties files (328 lines of code)
    • 2 *.markdown files (104 lines of code)
  • " *.xml" is biggest, containing 53.3% of code.
  • " *.markdown" is smallest, containing 1.36% of code.


*.xml4071 LOC (53%) 183 files
*.kt1955 LOC (25%) 56 files
*.md668 LOC (8%) 18 files
*.java512 LOC (6%) 7 files
*.properties328 LOC (4%) 14 files
*.markdown104 LOC (1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.inl files are analyzed with CppAnalyzer:
    • 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
  • *.cpp files are analyzed with CppAnalyzer:
    • 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
  • *.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)
  • *.h files are analyzed with CppAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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)
  • *.kts 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)
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
  • *.vsh 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
  • *.fsh 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
  • *.pro 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


2022-02-03 05:25