apple / servicetalk
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
adoc
proto
txt
hbs
properties
  • 16 extensions are included in analyses: java, xml, gradle, adoc, yml, proto, txt, hbs, properties, sh, groovy, yaml, gitignore, bat, css, json
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (79 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • exclude files with path like ".*/[Jj]avadoc/.*" (Generated documentation) (0 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (13 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.

main98090 LOC (50%) 1232 files
test87148 LOC (45%) 761 files
generated0 LOC (0%) 0 files
build and deployment2610 LOC (1%) 95 files
other5682 LOC (2%) 263 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
adoc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1232 files match defined criteria (98,090 lines of code, 100.0% vs. main code):
    • 1,212 *.java files (96,921 lines of code)
    • 5 *.groovy files (577 lines of code)
    • 9 *.proto files (356 lines of code)
    • 4 *.adoc files (192 lines of code)
    • 2 *.yaml files (44 lines of code)
  • " *.java" is biggest, containing 98.81% of code.
  • " *.yaml" is smallest, containing 0.04% of code.


*.java96921 LOC (98%) 1212 files
*.groovy577 LOC (<1%) 5 files
*.proto356 LOC (<1%) 9 files
*.adoc192 LOC (<1%) 4 files
*.yaml44 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
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 any line of content like ".*/simpletest/.*".
  • 761 files match defined criteria (87,148 lines of code, 88.8% vs. main code):
    • 747 *.java files (86,740 lines of code)
    • 11 *.proto files (374 lines of code)
    • 2 *.gradle files (23 lines of code)
    • 1 *.sh files (11 lines of code)
  • " *.java" is biggest, containing 99.53% of code.
  • " *.sh" is smallest, containing 0.01% of code.


*.java86740 LOC (99%) 747 files
*.proto374 LOC (<1%) 11 files
*.gradle23 LOC (<1%) 2 files
*.sh11 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 ".*/docker[-]compose[.]yaml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/pom[.]xml".
  • 95 files match defined criteria (2,610 lines of code, 2.7% vs. main code):
    • 88 *.gradle files (2,037 lines of code)
    • 5 *.sh files (434 lines of code)
    • 1 *.yaml files (71 lines of code)
    • 1 *.bat files (68 lines of code)
  • " *.gradle" is biggest, containing 78.05% of code.
  • " *.bat" is smallest, containing 2.61% of code.


*.gradle2037 LOC (78%) 88 files
*.sh434 LOC (16%) 5 files
*.yaml71 LOC (2%) 1 files
*.bat68 LOC (2%) 1 files
Other Code
adoc
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 263 files match defined criteria (5,682 lines of code, 5.8% vs. main code):
    • 138 *.java files (3,374 lines of code)
    • 102 *.xml files (1,953 lines of code)
    • 19 *.adoc files (245 lines of code)
    • 4 *.properties files (110 lines of code)
  • " *.java" is biggest, containing 59.38% of code.
  • " *.properties" is smallest, containing 1.94% of code.


*.java3374 LOC (59%) 138 files
*.xml1953 LOC (34%) 102 files
*.adoc245 LOC (4%) 19 files
*.properties110 LOC (1%) 4 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)
  • *.groovy files are analyzed with GroovyAnalyzer:
    • 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
  • *.proto 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
  • *.adoc 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
  • *.yaml files are analyzed with YamlAnalyzer:
    • 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


2022-01-30 21:58