facebook / facebook360_dep
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
ui
cmake
  • 14 extensions are included in analyses: html, js, py, cpp, h, md, json, css, txt, sh, yml, gitignore, ui, cmake
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (8 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (11 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (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).
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.

main37272 LOC (20%) 419 files
test2452 LOC (1%) 34 files
generated140206 LOC (77%) 1023 files
build and deployment74 LOC (<1%) 3 files
other1910 LOC (1%) 16 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ui
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 419 files match defined criteria (37,272 lines of code, 100.0% vs. main code):
    • 53 *.cpp files (11,544 lines of code)
    • 55 *.h files (7,178 lines of code)
    • 43 *.py files (7,029 lines of code)
    • 259 *.js files (6,107 lines of code)
    • 5 *.css files (3,250 lines of code)
    • 1 *.ui files (2,081 lines of code)
    • 1 *.cmake files (59 lines of code)
    • 2 *.html files (24 lines of code)
  • " *.cpp" is biggest, containing 30.97% of code.
  • " *.html" is smallest, containing 0.06% of code.


*.cpp11544 LOC (30%) 53 files
*.h7178 LOC (19%) 55 files
*.py7029 LOC (18%) 43 files
*.js6107 LOC (16%) 259 files
*.css3250 LOC (8%) 5 files
*.ui2081 LOC (5%) 1 files
*.cmake59 LOC (<1%) 1 files
*.html24 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 ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
  • 34 files match defined criteria (2,452 lines of code, 6.6% vs. main code):
    • 25 *.py files (1,174 lines of code)
    • 2 *.h files (702 lines of code)
    • 7 *.cpp files (576 lines of code)
  • " *.py" is biggest, containing 47.88% of code.
  • " *.cpp" is smallest, containing 23.49% of code.


*.py1174 LOC (47%) 25 files
*.h702 LOC (28%) 2 files
*.cpp576 LOC (23%) 7 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
  • 1023 files match defined criteria (140,206 lines of code, 376.2% vs. main code). All matches are in *.html files.


*.html140206 LOC (100%) 1023 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 ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 3 files match defined criteria (74 lines of code, 0.2% vs. main code). All matches are in *.sh files.


*.sh74 LOC (100%) 3 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
  • 16 files match defined criteria (1,910 lines of code, 5.1% vs. main code):
    • 10 *.json files (1,224 lines of code)
    • 3 *.txt files (600 lines of code)
    • 3 *.md files (86 lines of code)
  • " *.json" is biggest, containing 64.08% of code.
  • " *.md" is smallest, containing 4.5% of code.


*.json1224 LOC (64%) 10 files
*.txt600 LOC (31%) 3 files
*.md86 LOC (4%) 3 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.ui 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
  • *.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
  • *.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


2022-04-15 00:46