elastic / logstash
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
properties
rake
cfg
mod
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.

main78592 LOC (66%) 971 files
test22119 LOC (18%) 236 files
generated4 LOC (<1%) 2 files
build and deployment2174 LOC (1%) 38 files
other14536 LOC (12%) 295 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rake
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 971 files match defined criteria (78,592 LOC, 100.0% vs. main code):
    • 505 *.rb files (46,604 LOC)
    • 385 *.java files (28,269 LOC)
    • 12 *.rake files (1,121 LOC)
    • 34 *.erb files (857 LOC)
    • 1 *.yaml files (684 LOC)
    • 18 *.gemspec files (363 LOC)
    • 4 *.ps1 files (278 LOC)
    • 1 *.go files (166 LOC)
    • 5 *.groovy files (137 LOC)
    • 1 *.c files (56 LOC)
    • 4 *.cfg files (44 LOC)
    • 1 *.xml files (13 LOC)
  • " *.rb" is biggest, containing 59.3% of LOC.
  • " *.xml" is smallest, containing 0.02% of LOC.


*.rb46604 LOC (59%) 505 files
*.java28269 LOC (35%) 385 files
*.rake1121 LOC (1%) 12 files
*.erb857 LOC (1%) 34 files
*.yaml684 LOC (<1%) 1 file
*.gemspec363 LOC (<1%) 18 files
*.ps1278 LOC (<1%) 4 files
*.go166 LOC (<1%) 1 file
*.groovy137 LOC (<1%) 5 files
*.c56 LOC (<1%) 1 file
*.cfg44 LOC (<1%) 4 files
*.xml13 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
rake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/test[.].*".
  • 236 files match defined criteria (22,119 LOC, 28.1% vs. main code):
    • 172 *.java files (16,040 LOC)
    • 37 *.rb files (3,371 LOC)
    • 1 *.cfg files (1,939 LOC)
    • 17 *.sh files (445 LOC)
    • 3 *.groovy files (106 LOC)
    • 1 *.ps1 files (87 LOC)
    • 3 *.xml files (62 LOC)
    • 1 *.rake files (48 LOC)
    • 1 *.gemspec files (21 LOC)
  • " *.java" is biggest, containing 72.52% of LOC.
  • " *.gemspec" is smallest, containing 0.09% of LOC.


*.java16040 LOC (72%) 172 files
*.rb3371 LOC (15%) 37 files
*.cfg1939 LOC (8%) 1 file
*.sh445 LOC (2%) 17 files
*.groovy106 LOC (<1%) 3 files
*.ps187 LOC (<1%) 1 file
*.xml62 LOC (<1%) 3 files
*.rake48 LOC (<1%) 1 file
*.gemspec21 LOC (<1%) 1 file
Generated Code
Automatically generated files, not manually changed after generation.
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/generated/.*".
  • 2 files match defined criteria (4 LOC, 0.0% vs. main code). All matches are in *.txt files.


*.txt4 LOC (100%) 2 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 ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
  • 38 files match defined criteria (2,174 LOC, 2.8% vs. main code):
    • 14 *.gradle files (1,577 LOC)
    • 23 *.sh files (526 LOC)
    • 1 *.bat files (71 LOC)
  • " *.gradle" is biggest, containing 72.54% of LOC.
  • " *.bat" is smallest, containing 3.27% of LOC.


*.gradle1577 LOC (72%) 14 files
*.sh526 LOC (24%) 23 files
*.bat71 LOC (3%) 1 file
Other Code
txt
properties
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/vendor/.*".
  • 295 files match defined criteria (14,536 LOC, 18.5% vs. main code):
    • 227 *.txt files (11,208 LOC)
    • 13 *.json files (1,490 LOC)
    • 31 *.md files (1,272 LOC)
    • 22 *.properties files (560 LOC)
    • 2 *.mod files (6 LOC)
  • " *.txt" is biggest, containing 77.11% of LOC.
  • " *.mod" is smallest, containing 0.04% of LOC.


*.txt11208 LOC (77%) 227 files
*.json1490 LOC (10%) 13 files
*.md1272 LOC (8%) 31 files
*.properties560 LOC (3%) 22 files
*.mod6 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:38