facebook / facebook-business-sdk-codegen
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
npmignore
editorconfig
mdown
in
ini
babelrc
eslintignore
prettierignore
  • 23 extensions are included in analyses: json, php, rb, js, mustache, py, java, md, gitignore, txt, xml, yml, css, npmignore, editorconfig, html, mdown, in, ini, babelrc, kt, eslintignore, prettierignore
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (28 files).
    • exclude files with path like ".*/flow-typed/.*\.js" (flow-typed) (1 file).
    • 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.

main15819 LOC (16%) 246 files
test5397 LOC (5%) 88 files
generated9905 LOC (10%) 1 files
build and deployment0 LOC (0%) 0 files
other63248 LOC (67%) 502 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 246 files match defined criteria (15,819 lines of code, 100.0% vs. main code):
    • 42 *.mustache files (4,216 lines of code)
    • 38 *.js files (3,441 lines of code)
    • 88 *.php files (2,860 lines of code)
    • 26 *.py files (1,982 lines of code)
    • 13 *.java files (1,831 lines of code)
    • 38 *.rb files (1,470 lines of code)
    • 1 *.in files (19 lines of code)
  • " *.mustache" is biggest, containing 26.65% of code.
  • " *.in" is smallest, containing 0.12% of code.


*.mustache4216 LOC (26%) 42 files
*.js3441 LOC (21%) 38 files
*.php2860 LOC (18%) 88 files
*.py1982 LOC (12%) 26 files
*.java1831 LOC (11%) 13 files
*.rb1470 LOC (9%) 38 files
*.in19 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 ".*/[Ss]pecs/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*/[Tt]est/.*".
  • 88 files match defined criteria (5,397 lines of code, 34.1% vs. main code):
    • 68 *.php files (3,633 lines of code)
    • 7 *.js files (995 lines of code)
    • 4 *.java files (439 lines of code)
    • 6 *.rb files (209 lines of code)
    • 1 *.kt files (84 lines of code)
    • 2 *.xml files (37 lines of code)
  • " *.php" is biggest, containing 67.32% of code.
  • " *.xml" is smallest, containing 0.69% of code.


*.php3633 LOC (67%) 68 files
*.js995 LOC (18%) 7 files
*.java439 LOC (8%) 4 files
*.rb209 LOC (3%) 6 files
*.kt84 LOC (1%) 1 files
*.xml37 LOC (<1%) 2 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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (9,905 lines of code, 62.6% vs. main code). All matches are in *.json files.


*.json9905 LOC (100%) 1 files
Other Code
txt
mdown
ini
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 ".*/[.]prettierignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]mdown".
    • files with paths like ".*/[.]eslintignore".
  • 502 files match defined criteria (63,248 lines of code, 399.8% vs. main code):
    • 426 *.json files (57,950 lines of code)
    • 20 *.md files (1,603 lines of code)
    • 14 *.java files (914 lines of code)
    • 14 *.py files (670 lines of code)
    • 5 *.php files (534 lines of code)
    • 7 *.txt files (445 lines of code)
    • 3 *.xml files (401 lines of code)
    • 2 *.js files (257 lines of code)
    • 7 *.rb files (215 lines of code)
    • 1 *.html files (143 lines of code)
    • 1 *.css files (98 lines of code)
    • 1 *.mdown files (9 lines of code)
    • 1 *.ini files (9 lines of code)
  • " *.json" is biggest, containing 91.62% of code.
  • " *.ini" is smallest, containing 0.01% of code.


*.json57950 LOC (91%) 426 files
*.md1603 LOC (2%) 20 files
*.java914 LOC (1%) 14 files
*.py670 LOC (1%) 14 files
*.php534 LOC (<1%) 5 files
*.txt445 LOC (<1%) 7 files
*.xml401 LOC (<1%) 3 files
*.js257 LOC (<1%) 2 files
*.rb215 LOC (<1%) 7 files
*.html143 LOC (<1%) 1 files
*.css98 LOC (<1%) 1 files
*.mdown9 LOC (<1%) 1 files
*.ini9 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.mustache 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
  • *.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
  • *.php files are analyzed with PhpAnalyzer:
    • 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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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-04-15 00:40