elastic / elasticsearch
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
st
policy
xsd
pt
ini
prefs
mod
editorconfig
cfg
diff
asc
el
mdx
gitattributes
snap
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.

main1920392 LOC (52%) 14,651 files
test1500657 LOC (40%) 8,546 files
generated68460 LOC (1%) 561 files
build and deployment16900 LOC (<1%) 423 files
other171684 LOC (4%) 1,924 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
st
policy
cfg
prefs
asc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 14651 files match defined criteria (1,920,392 LOC, 100.0% vs. main code):
    • 14,364 *.java files (1,894,737 LOC)
    • 31 *.st files (6,572 LOC)
    • 6 *.xml files (5,429 LOC)
    • 42 *.groovy files (4,941 LOC)
    • 139 *.yaml files (3,615 LOC)
    • 24 *.g4 files (2,266 LOC)
    • 6 *.asciidoc files (775 LOC)
    • 2 *.toml files (462 LOC)
    • 3 *.py files (422 LOC)
    • 7 *.policy files (332 LOC)
    • 13 *.sql files (300 LOC)
    • 2 *.c files (231 LOC)
    • 1 *.cpp files (160 LOC)
    • 2 *.cfg files (42 LOC)
    • 2 *.prefs files (32 LOC)
    • 2 *.js files (31 LOC)
    • 1 *.asc files (28 LOC)
    • 1 *.h files (10 LOC)
    • 3 *.ftl files (7 LOC)
  • " *.java" is biggest, containing 98.66% of LOC.
  • " *.ftl" is smallest, containing 0% of LOC.


*.java1894737 LOC (98%) 14,364 files
*.st6572 LOC (<1%) 31 files
*.xml5429 LOC (<1%) 6 files
*.groovy4941 LOC (<1%) 42 files
*.yaml3615 LOC (<1%) 139 files
*.g42266 LOC (<1%) 24 files
*.asciidoc775 LOC (<1%) 6 files
*.toml462 LOC (<1%) 2 files
*.py422 LOC (<1%) 3 files
*.policy332 LOC (<1%) 7 files
*.sql300 LOC (<1%) 13 files
*.c231 LOC (<1%) 2 files
*.cpp160 LOC (<1%) 1 file
*.cfg42 LOC (<1%) 2 files
*.prefs32 LOC (<1%) 2 files
*.js31 LOC (<1%) 2 files
*.asc28 LOC (<1%) 1 file
*.h10 LOC (<1%) 1 file
*.ftl7 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mod
policy
st
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 ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*UnitTests[.][a-zA-Z0-9_]+".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*_test[.].*".
  • 8546 files match defined criteria (1,500,657 LOC, 78.1% vs. main code):
    • 8,332 *.java files (1,486,720 LOC)
    • 11 *.toml files (4,403 LOC)
    • 25 *.groovy files (3,762 LOC)
    • 62 *.xml files (2,948 LOC)
    • 82 *.gradle files (1,891 LOC)
    • 3 *.css files (294 LOC)
    • 6 *.asciidoc files (214 LOC)
    • 8 *.sh files (170 LOC)
    • 2 *.mod files (77 LOC)
    • 1 *.bash files (72 LOC)
    • 7 *.policy files (52 LOC)
    • 4 *.html files (45 LOC)
    • 1 *.mustache files (5 LOC)
    • 2 *.st files (4 LOC)
  • " *.java" is biggest, containing 99.07% of LOC.
  • " *.st" is smallest, containing 0% of LOC.


*.java1486720 LOC (99%) 8,332 files
*.toml4403 LOC (<1%) 11 files
*.groovy3762 LOC (<1%) 25 files
*.xml2948 LOC (<1%) 62 files
*.gradle1891 LOC (<1%) 82 files
*.css294 LOC (<1%) 3 files
*.asciidoc214 LOC (<1%) 6 files
*.sh170 LOC (<1%) 8 files
*.mod77 LOC (<1%) 2 files
*.bash72 LOC (<1%) 1 file
*.policy52 LOC (<1%) 7 files
*.html45 LOC (<1%) 4 files
*.mustache5 LOC (<1%) 1 file
*.st4 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 ".*/generated/.*".
  • 561 files match defined criteria (68,460 LOC, 3.6% vs. main code). All matches are in *.java files.


*.java68460 LOC (100%) 561 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 ".*[.]gradle".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[.]json".
  • 423 files match defined criteria (16,900 LOC, 0.9% vs. main code):
    • 415 *.gradle files (16,317 LOC)
    • 6 *.sh files (439 LOC)
    • 2 *.bat files (144 LOC)
  • " *.gradle" is biggest, containing 96.55% of LOC.
  • " *.bat" is smallest, containing 0.85% of LOC.


*.gradle16317 LOC (96%) 415 files
*.sh439 LOC (2%) 6 files
*.bat144 LOC (<1%) 2 files
Other Code
txt
properties
xsd
mdx
ini
diff
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • 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 ".*/checkstyle[.]xml".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*[.]markdown".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/resources/.*[.]xsd".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]mdx".
  • 1924 files match defined criteria (171,684 LOC, 8.9% vs. main code):
    • 713 *.txt files (78,339 LOC)
    • 1,018 *.json files (72,516 LOC)
    • 44 *.properties files (9,364 LOC)
    • 61 *.java files (3,484 LOC)
    • 12 *.xsd files (2,998 LOC)
    • 35 *.md files (2,652 LOC)
    • 18 *.asciidoc files (1,499 LOC)
    • 12 *.gradle files (264 LOC)
    • 4 *.xml files (176 LOC)
    • 1 *.markdown files (152 LOC)
    • 1 *.mdx files (116 LOC)
    • 1 *.bat files (73 LOC)
    • 3 *.ini files (38 LOC)
    • 1 *.diff files (13 LOC)
  • " *.txt" is biggest, containing 45.63% of LOC.
  • " *.diff" is smallest, containing 0.01% of LOC.


*.txt78339 LOC (45%) 713 files
*.json72516 LOC (42%) 1,018 files
*.properties9364 LOC (5%) 44 files
*.java3484 LOC (2%) 61 files
*.xsd2998 LOC (1%) 12 files
*.md2652 LOC (1%) 35 files
*.asciidoc1499 LOC (<1%) 18 files
*.gradle264 LOC (<1%) 12 files
*.xml176 LOC (<1%) 4 files
*.markdown152 LOC (<1%) 1 file
*.mdx116 LOC (<1%) 1 file
*.bat73 LOC (<1%) 1 file
*.ini38 LOC (<1%) 3 files
*.diff13 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:52