tensorflow / ngraph-bridge
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
cmake
patch
pb
04
ini
clang-format
  • 17 extensions are included in analyses: py, cc, txt, h, sh, json, cpp, md, yml, cmake, patch, gitignore, pb, yaml, 04, ini, clang-format
  • 7 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 ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (25 files).
    • exclude files with path like ".*[.][0-9]+" (Binary files (e.g. multipart archives)) (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.

main9530 LOC (41%) 63 files
test9767 LOC (42%) 95 files
generated0 LOC (0%) 0 files
build and deployment365 LOC (1%) 6 files
other3081 LOC (13%) 43 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 63 files match defined criteria (9,530 lines of code, 100.0% vs. main code):
    • 22 *.cc files (6,724 lines of code)
    • 13 *.py files (1,737 lines of code)
    • 23 *.h files (657 lines of code)
    • 5 *.cmake files (412 lines of code)
  • " *.cc" is biggest, containing 70.56% of code.
  • " *.cmake" is smallest, containing 4.32% of code.


*.cc6724 LOC (70%) 22 files
*.py1737 LOC (18%) 13 files
*.h657 LOC (6%) 23 files
*.cmake412 LOC (4%) 5 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pb
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 95 files match defined criteria (9,767 lines of code, 102.5% vs. main code):
    • 11 *.cpp files (3,896 lines of code)
    • 56 *.py files (3,683 lines of code)
    • 9 *.cc files (975 lines of code)
    • 7 *.sh files (540 lines of code)
    • 7 *.yml files (295 lines of code)
    • 2 *.h files (199 lines of code)
    • 2 *.pb files (178 lines of code)
    • 1 *.yaml files (1 lines of code)
  • " *.cpp" is biggest, containing 39.89% of code.
  • " *.yaml" is smallest, containing 0.01% of code.


*.cpp3896 LOC (39%) 11 files
*.py3683 LOC (37%) 56 files
*.cc975 LOC (9%) 9 files
*.sh540 LOC (5%) 7 files
*.yml295 LOC (3%) 7 files
*.h199 LOC (2%) 2 files
*.pb178 LOC (1%) 2 files
*.yaml1 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 6 files match defined criteria (365 lines of code, 3.8% vs. main code). All matches are in *.sh files.


*.sh365 LOC (100%) 6 files
Other Code
patch
ini
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 ".*[.]patch".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
  • 43 files match defined criteria (3,081 lines of code, 32.3% vs. main code):
    • 10 *.py files (1,606 lines of code)
    • 4 *.cc files (695 lines of code)
    • 10 *.md files (434 lines of code)
    • 12 *.json files (172 lines of code)
    • 2 *.h files (86 lines of code)
    • 4 *.patch files (74 lines of code)
    • 1 *.ini files (14 lines of code)
  • " *.py" is biggest, containing 52.13% of code.
  • " *.ini" is smallest, containing 0.45% of code.


*.py1606 LOC (52%) 10 files
*.cc695 LOC (22%) 4 files
*.md434 LOC (14%) 10 files
*.json172 LOC (5%) 12 files
*.h86 LOC (2%) 2 files
*.patch74 LOC (2%) 4 files
*.ini14 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.cmake 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 08:22