tensorflow / odml-pathways
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
storyboard
plist
  • 18 extensions are included in analyses: xml, gradle, kt, gitignore, properties, json, pro, bat, swift, txt, js, storyboard, md, plist, ipynb, css, html, java
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (68 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (15 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (15 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (2 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (13 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.

main9690 LOC (48%) 61 files
test207 LOC (1%) 18 files
generated0 LOC (0%) 0 files
build and deployment1885 LOC (9%) 60 files
other8365 LOC (41%) 245 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 61 files match defined criteria (9,690 lines of code, 100.0% vs. main code):
    • 11 *.js files (6,338 lines of code)
    • 25 *.kt files (2,357 lines of code)
    • 15 *.swift files (468 lines of code)
    • 4 *.css files (335 lines of code)
    • 4 *.html files (130 lines of code)
    • 2 *.java files (62 lines of code)
  • " *.js" is biggest, containing 65.41% of code.
  • " *.java" is smallest, containing 0.64% of code.


*.js6338 LOC (65%) 11 files
*.kt2357 LOC (24%) 25 files
*.swift468 LOC (4%) 15 files
*.css335 LOC (3%) 4 files
*.html130 LOC (1%) 4 files
*.java62 LOC (<1%) 2 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/.*".
  • 18 files match defined criteria (207 lines of code, 2.1% vs. main code). All matches are in *.kt files.


*.kt207 LOC (100%) 18 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/package[.]json".
  • 60 files match defined criteria (1,885 lines of code, 19.5% vs. main code):
    • 45 *.gradle files (970 lines of code)
    • 15 *.bat files (915 lines of code)
  • " *.gradle" is biggest, containing 51.46% of code.
  • " *.bat" is smallest, containing 48.54% of code.


*.gradle970 LOC (51%) 45 files
*.bat915 LOC (48%) 15 files
Other Code
storyboard
plist
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • 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 ".*[.]txt".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 245 files match defined criteria (8,365 lines of code, 86.3% vs. main code):
    • 188 *.xml files (5,453 lines of code)
    • 4 *.ipynb files (1,141 lines of code)
    • 19 *.json files (638 lines of code)
    • 10 *.storyboard files (421 lines of code)
    • 5 *.plist files (330 lines of code)
    • 15 *.properties files (315 lines of code)
    • 4 *.md files (67 lines of code)
  • " *.xml" is biggest, containing 65.19% of code.
  • " *.md" is smallest, containing 0.8% of code.


*.xml5453 LOC (65%) 188 files
*.ipynb1141 LOC (13%) 4 files
*.json638 LOC (7%) 19 files
*.storyboard421 LOC (5%) 10 files
*.plist330 LOC (3%) 5 files
*.properties315 LOC (3%) 15 files
*.md67 LOC (<1%) 4 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.swift files are analyzed with SwiftAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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)


2022-02-03 08:26