facebook / TextLayoutBuilder
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
properties
txt
  • 13 extensions are included in analyses: html, java, gradle, xml, gitignore, kt, md, properties, css, txt, js, bat, json
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (26 files).
    • exclude files with path like ".*/[Jj]avadoc/.*" (Generated documentation) (0 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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.

main1264 LOC (49%) 25 files
test690 LOC (27%) 9 files
generated0 LOC (0%) 0 files
build and deployment391 LOC (15%) 15 files
other189 LOC (7%) 5 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 ".*".
  • 25 files match defined criteria (1,264 lines of code, 100.0% vs. main code):
    • 18 *.java files (1,171 lines of code)
    • 5 *.xml files (53 lines of code)
    • 2 *.kt files (40 lines of code)
  • " *.java" is biggest, containing 92.64% of code.
  • " *.kt" is smallest, containing 3.16% of code.


*.java1171 LOC (92%) 18 files
*.xml53 LOC (4%) 5 files
*.kt40 LOC (3%) 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 ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]est/.*".
  • 9 files match defined criteria (690 lines of code, 54.6% vs. main code):
    • 6 *.java files (565 lines of code)
    • 2 *.kt files (117 lines of code)
    • 1 *.xml files (8 lines of code)
  • " *.java" is biggest, containing 81.88% of code.
  • " *.xml" is smallest, containing 1.16% of code.


*.java565 LOC (81%) 6 files
*.kt117 LOC (16%) 2 files
*.xml8 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
  • 15 files match defined criteria (391 lines of code, 30.9% vs. main code):
    • 12 *.gradle files (311 lines of code)
    • 1 *.bat files (61 lines of code)
    • 2 *.xml files (19 lines of code)
  • " *.gradle" is biggest, containing 79.54% of code.
  • " *.xml" is smallest, containing 4.86% of code.


*.gradle311 LOC (79%) 12 files
*.bat61 LOC (15%) 1 files
*.xml19 LOC (4%) 2 files
Other Code
properties
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 5 files match defined criteria (189 lines of code, 15.0% vs. main code):
    • 1 *.md files (73 lines of code)
    • 1 *.json files (72 lines of code)
    • 2 *.properties files (38 lines of code)
    • 1 *.txt files (6 lines of code)
  • " *.md" is biggest, containing 38.62% of code.
  • " *.txt" is smallest, containing 3.17% of code.


*.md73 LOC (38%) 1 files
*.json72 LOC (38%) 1 files
*.properties38 LOC (20%) 2 files
*.txt6 LOC (3%) 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)
  • *.xml 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
  • *.kt files are analyzed with KotlinAnalyzer:
    • 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 (based on imports and package statements)


2022-04-14 23:08