facebookresearch / polymetis
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
urdf
dae
xacro
pt
mtl
launch
txt
ini
in
cfg
clang-format
toml
proto
gitmodules
  • 26 extensions are included in analyses: rst, py, urdf, dae, xacro, md, pt, yaml, mtl, sh, cpp, json, gitignore, launch, hpp, yml, h, txt, xml, ini, in, cfg, clang-format, toml, proto, gitmodules
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (13 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (330 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) (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.

main13437 LOC (87%) 141 files
test1438 LOC (9%) 41 files
generated0 LOC (0%) 0 files
build and deployment166 LOC (1%) 8 files
other297 LOC (1%) 12 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
urdf
xacro
mtl
proto
launch
toml
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 141 files match defined criteria (13,437 lines of code, 100.0% vs. main code):
    • 30 *.urdf files (7,246 lines of code)
    • 24 *.xacro files (2,334 lines of code)
    • 40 *.py files (1,843 lines of code)
    • 6 *.cpp files (939 lines of code)
    • 13 *.yaml files (350 lines of code)
    • 3 *.hpp files (250 lines of code)
    • 14 *.mtl files (168 lines of code)
    • 2 *.h files (127 lines of code)
    • 1 *.proto files (80 lines of code)
    • 1 *.yml files (41 lines of code)
    • 4 *.launch files (32 lines of code)
    • 1 *.toml files (19 lines of code)
    • 1 *.in files (7 lines of code)
    • 1 *.cfg files (1 lines of code)
  • " *.urdf" is biggest, containing 53.93% of code.
  • " *.cfg" is smallest, containing 0.01% of code.


*.urdf7246 LOC (53%) 30 files
*.xacro2334 LOC (17%) 24 files
*.py1843 LOC (13%) 40 files
*.cpp939 LOC (6%) 6 files
*.yaml350 LOC (2%) 13 files
*.hpp250 LOC (1%) 3 files
*.mtl168 LOC (1%) 14 files
*.h127 LOC (<1%) 2 files
*.proto80 LOC (<1%) 1 files
*.yml41 LOC (<1%) 1 files
*.launch32 LOC (<1%) 4 files
*.toml19 LOC (<1%) 1 files
*.in7 LOC (<1%) 1 files
*.cfg1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 41 files match defined criteria (1,438 lines of code, 10.7% vs. main code):
    • 21 *.py files (878 lines of code)
    • 2 *.cpp files (281 lines of code)
    • 15 *.pt files (214 lines of code)
    • 2 *.sh files (48 lines of code)
    • 1 *.yaml files (17 lines of code)
  • " *.py" is biggest, containing 61.06% of code.
  • " *.yaml" is smallest, containing 1.18% of code.


*.py878 LOC (61%) 21 files
*.cpp281 LOC (19%) 2 files
*.pt214 LOC (14%) 15 files
*.sh48 LOC (3%) 2 files
*.yaml17 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".
    • files with paths like ".*/[.]gitmodules".
  • 8 files match defined criteria (166 lines of code, 1.2% vs. main code). All matches are in *.sh files.


*.sh166 LOC (100%) 8 files
Other Code
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 12 files match defined criteria (297 lines of code, 2.2% vs. main code):
    • 6 *.md files (153 lines of code)
    • 4 *.py files (129 lines of code)
    • 1 *.xml files (12 lines of code)
    • 1 *.ini files (3 lines of code)
  • " *.md" is biggest, containing 51.52% of code.
  • " *.ini" is smallest, containing 1.01% of code.


*.md153 LOC (51%) 6 files
*.py129 LOC (43%) 4 files
*.xml12 LOC (4%) 1 files
*.ini3 LOC (1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.urdf files are analyzed with XmlAnalyzer:
    • 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
  • *.xacro files are analyzed with XmlAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.hpp 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
  • *.mtl 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
  • *.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
  • *.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
  • *.yml 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
  • *.launch files are analyzed with XmlAnalyzer:
    • 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
  • *.toml 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
  • *.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
  • *.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


2022-01-25 20:15