facebook / facebook-java-business-sdk
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
mdown
  • 10 extensions are included in analyses: java, md, xml, yml, txt, mdown, sh, gitignore, json, kt
  • 3 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (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).
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.

main264497 LOC (97%) 455 files
test1398 LOC (<1%) 13 files
generated0 LOC (0%) 0 files
build and deployment230 LOC (<1%) 2 files
other4776 LOC (1%) 167 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 455 files match defined criteria (264,497 lines of code, 100.0% vs. main code). All matches are in *.java files.


*.java264497 LOC (100%) 455 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/.*".
  • 13 files match defined criteria (1,398 lines of code, 0.5% vs. main code):
    • 12 *.java files (1,314 lines of code)
    • 1 *.kt files (84 lines of code)
  • " *.java" is biggest, containing 93.99% of code.
  • " *.kt" is smallest, containing 6.01% of code.


*.java1314 LOC (93%) 12 files
*.kt84 LOC (6%) 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 ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 2 files match defined criteria (230 lines of code, 0.1% vs. main code):
    • 1 *.xml files (183 lines of code)
    • 1 *.sh files (47 lines of code)
  • " *.xml" is biggest, containing 79.57% of code.
  • " *.sh" is smallest, containing 20.43% of code.


*.xml183 LOC (79%) 1 files
*.sh47 LOC (20%) 1 files
Other Code
txt
mdown
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]mdown".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 167 files match defined criteria (4,776 lines of code, 1.8% vs. main code):
    • 159 *.java files (4,065 lines of code)
    • 3 *.md files (323 lines of code)
    • 2 *.xml files (291 lines of code)
    • 1 *.json files (72 lines of code)
    • 1 *.txt files (16 lines of code)
    • 1 *.mdown files (9 lines of code)
  • " *.java" is biggest, containing 85.11% of code.
  • " *.mdown" is smallest, containing 0.19% of code.


*.java4065 LOC (85%) 159 files
*.md323 LOC (6%) 3 files
*.xml291 LOC (6%) 2 files
*.json72 LOC (1%) 1 files
*.txt16 LOC (<1%) 1 files
*.mdown9 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)


2022-04-14 23:06