facebookresearch / StarSpace
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
vcxproj
filters
txt
cc
  • 11 extensions are included in analyses: cpp, h, sh, vcxproj, filters, md, txt, py, cc, gitignore, json
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (1 file).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (3 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) (2 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.

main5090 LOC (78%) 41 files
test650 LOC (9%) 8 files
generated0 LOC (0%) 0 files
build and deployment22 LOC (<1%) 1 files
other750 LOC (11%) 14 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
filters
cc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 41 files match defined criteria (5,090 lines of code, 100.0% vs. main code):
    • 16 *.cpp files (2,579 lines of code)
    • 6 *.vcxproj files (1,383 lines of code)
    • 12 *.h files (840 lines of code)
    • 6 *.filters files (203 lines of code)
    • 1 *.cc files (85 lines of code)
  • " *.cpp" is biggest, containing 50.67% of code.
  • " *.cc" is smallest, containing 1.67% of code.


*.cpp2579 LOC (50%) 16 files
*.vcxproj1383 LOC (27%) 6 files
*.h840 LOC (16%) 12 files
*.filters203 LOC (3%) 6 files
*.cc85 LOC (1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
vcxproj
filters
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
  • 8 files match defined criteria (650 lines of code, 12.8% vs. main code):
    • 2 *.vcxproj files (470 lines of code)
    • 2 *.cpp files (102 lines of code)
    • 2 *.filters files (44 lines of code)
    • 2 *.py files (34 lines of code)
  • " *.vcxproj" is biggest, containing 72.31% of code.
  • " *.py" is smallest, containing 5.23% of code.


*.vcxproj470 LOC (72%) 2 files
*.cpp102 LOC (15%) 2 files
*.filters44 LOC (6%) 2 files
*.py34 LOC (5%) 2 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".
  • 1 file matches defined criteria (22 lines of code, 0.4% vs. main code). All matches are in *.sh files.


*.sh22 LOC (100%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
  • 14 files match defined criteria (750 lines of code, 14.7% vs. main code):
    • 8 *.sh files (391 lines of code)
    • 6 *.md files (359 lines of code)
  • " *.sh" is biggest, containing 52.13% of code.
  • " *.md" is smallest, containing 47.87% of code.


*.sh391 LOC (52%) 8 files
*.md359 LOC (47%) 6 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.vcxproj 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
  • *.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
  • *.filters 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
  • *.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


2022-01-25 19:32