tensorflow / decision-forests
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
cfg
in
tpl
txt
proto
  • 16 extensions are included in analyses: py, cc, md, bzl, sh, h, ipynb, cfg, bat, yaml, in, js, tpl, txt, proto, json
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (10 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) (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.

main10061 LOC (51%) 62 files
test3814 LOC (19%) 22 files
generated0 LOC (0%) 0 files
build and deployment211 LOC (1%) 7 files
other5281 LOC (27%) 21 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
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 62 files match defined criteria (10,061 lines of code, 100.0% vs. main code):
    • 37 *.py files (4,877 lines of code)
    • 12 *.cc files (4,011 lines of code)
    • 6 *.h files (685 lines of code)
    • 1 *.js files (282 lines of code)
    • 2 *.bzl files (117 lines of code)
    • 1 *.proto files (43 lines of code)
    • 2 *.cfg files (38 lines of code)
    • 1 *.in files (8 lines of code)
  • " *.py" is biggest, containing 48.47% of code.
  • " *.in" is smallest, containing 0.08% of code.


*.py4877 LOC (48%) 37 files
*.cc4011 LOC (39%) 12 files
*.h685 LOC (6%) 6 files
*.js282 LOC (2%) 1 files
*.bzl117 LOC (1%) 2 files
*.proto43 LOC (<1%) 1 files
*.cfg38 LOC (<1%) 2 files
*.in8 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 ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 22 files match defined criteria (3,814 lines of code, 37.9% vs. main code):
    • 18 *.py files (3,570 lines of code)
    • 2 *.cc files (168 lines of code)
    • 1 *.sh files (48 lines of code)
    • 1 *.bat files (28 lines of code)
  • " *.py" is biggest, containing 93.6% of code.
  • " *.bat" is smallest, containing 0.73% of code.


*.py3570 LOC (93%) 18 files
*.cc168 LOC (4%) 2 files
*.sh48 LOC (1%) 1 files
*.bat28 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
  • 7 files match defined criteria (211 lines of code, 2.1% vs. main code):
    • 6 *.sh files (194 lines of code)
    • 1 *.bat files (17 lines of code)
  • " *.sh" is biggest, containing 91.94% of code.
  • " *.bat" is smallest, containing 8.06% of code.


*.sh194 LOC (91%) 6 files
*.bat17 LOC (8%) 1 files
Other Code
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 21 files match defined criteria (5,281 lines of code, 52.5% vs. main code):
    • 4 *.ipynb files (3,704 lines of code)
    • 14 *.md files (1,480 lines of code)
    • 2 *.yaml files (69 lines of code)
    • 1 *.py files (28 lines of code)
  • " *.ipynb" is biggest, containing 70.14% of code.
  • " *.py" is smallest, containing 0.53% of code.


*.ipynb3704 LOC (70%) 4 files
*.md1480 LOC (28%) 14 files
*.yaml69 LOC (1%) 2 files
*.py28 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.cc 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
  • *.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
  • *.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
  • *.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
  • *.in files are analyzed with RustAnalyzer:
    • 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


2022-02-03 08:26