apache / cloudstack
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
in
cfg
txt
xsl
spec
csproj
xsd
po
htaccess
editorconfig
babelrc
gitattributes
targets
ini
vhd
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.

main997552 LOC (65%) 7,568 files
test446816 LOC (29%) 1,694 files
generated244 LOC (<1%) 2 files
build and deployment21089 LOC (1%) 306 files
other48375 LOC (3%) 309 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
cfg
spec
xsl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 7568 files match defined criteria (997,552 LOC, 100.0% vs. main code):
    • 6,266 *.java files (726,470 LOC)
    • 329 *.vue files (120,307 LOC)
    • 45 *.cs files (41,324 LOC)
    • 197 *.sql files (26,966 LOC)
    • 124 *.py files (26,668 LOC)
    • 161 *.js files (23,965 LOC)
    • 303 *.xml files (12,365 LOC)
    • 48 *.in files (4,891 LOC)
    • 21 *.cfg files (3,252 LOC)
    • 7 *.css files (3,172 LOC)
    • 18 *.less files (2,754 LOC)
    • 4 *.spec files (2,488 LOC)
    • 7 *.xsl files (1,532 LOC)
    • 15 *.html files (812 LOC)
    • 2 *.erb files (230 LOC)
    • 14 *.rb files (188 LOC)
    • 4 *.ftl files (123 LOC)
    • 2 *.scss files (40 LOC)
    • 1 *.jsp files (5 LOC)
  • " *.java" is biggest, containing 72.83% of LOC.
  • " *.jsp" is smallest, containing 0% of LOC.


*.java726470 LOC (72%) 6,266 files
*.vue120307 LOC (12%) 329 files
*.cs41324 LOC (4%) 45 files
*.sql26966 LOC (2%) 197 files
*.py26668 LOC (2%) 124 files
*.js23965 LOC (2%) 161 files
*.xml12365 LOC (1%) 303 files
*.in4891 LOC (<1%) 48 files
*.cfg3252 LOC (<1%) 21 files
*.css3172 LOC (<1%) 7 files
*.less2754 LOC (<1%) 18 files
*.spec2488 LOC (<1%) 4 files
*.xsl1532 LOC (<1%) 7 files
*.html812 LOC (<1%) 15 files
*.erb230 LOC (<1%) 2 files
*.rb188 LOC (<1%) 14 files
*.ftl123 LOC (<1%) 4 files
*.scss40 LOC (<1%) 2 files
*.jsp5 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
csproj
in
vhd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*[.]spec[.]js".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
  • 1694 files match defined criteria (446,816 LOC, 44.8% vs. main code):
    • 456 *.py files (230,548 LOC)
    • 1,038 *.java files (154,750 LOC)
    • 111 *.xml files (52,253 LOC)
    • 11 *.js files (4,080 LOC)
    • 23 *.groovy files (2,384 LOC)
    • 44 *.sh files (1,193 LOC)
    • 3 *.cs files (1,140 LOC)
    • 1 *.cfg files (162 LOC)
    • 1 *.csproj files (131 LOC)
    • 2 *.bat files (120 LOC)
    • 1 *.in files (50 LOC)
    • 2 *.sql files (3 LOC)
    • 1 *.vhd files (2 LOC)
  • " *.py" is biggest, containing 51.6% of LOC.
  • " *.vhd" is smallest, containing 0% of LOC.


*.py230548 LOC (51%) 456 files
*.java154750 LOC (34%) 1,038 files
*.xml52253 LOC (11%) 111 files
*.js4080 LOC (<1%) 11 files
*.groovy2384 LOC (<1%) 23 files
*.sh1193 LOC (<1%) 44 files
*.cs1140 LOC (<1%) 3 files
*.cfg162 LOC (<1%) 1 file
*.csproj131 LOC (<1%) 1 file
*.bat120 LOC (<1%) 2 files
*.in50 LOC (<1%) 1 file
*.sql3 LOC (<1%) 2 files
*.vhd2 LOC (<1%) 1 file
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with any line of content like "\<\!\-\-[ ]*Generated by .*".
    • files with any line of content like "// This file was generated .*".
  • 2 files match defined criteria (244 LOC, 0.0% vs. main code):
    • 1 *.sh files (162 LOC)
    • 1 *.java files (82 LOC)
  • " *.sh" is biggest, containing 66.39% of LOC.
  • " *.java" is smallest, containing 33.61% of LOC.


*.sh162 LOC (66%) 1 file
*.java82 LOC (33%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]csproj".
  • 306 files match defined criteria (21,089 LOC, 2.1% vs. main code):
    • 155 *.xml files (10,376 LOC)
    • 146 *.sh files (10,221 LOC)
    • 3 *.csproj files (440 LOC)
    • 2 *.bat files (52 LOC)
  • " *.xml" is biggest, containing 49.2% of LOC.
  • " *.bat" is smallest, containing 0.25% of LOC.


*.xml10376 LOC (49%) 155 files
*.sh10221 LOC (48%) 146 files
*.csproj440 LOC (2%) 3 files
*.bat52 LOC (<1%) 2 files
Other Code
properties
txt
po
xsd
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*/[.]htaccess".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*[.]po".
    • files with paths like ".*/resources/.*[.]xsd".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
  • 309 files match defined criteria (48,375 LOC, 4.8% vs. main code):
    • 49 *.json files (35,931 LOC)
    • 192 *.properties files (4,970 LOC)
    • 27 *.md files (2,797 LOC)
    • 11 *.py files (1,838 LOC)
    • 11 *.txt files (1,057 LOC)
    • 3 *.po files (689 LOC)
    • 8 *.svg files (687 LOC)
    • 3 *.xsd files (251 LOC)
    • 4 *.xml files (145 LOC)
    • 1 *.ini files (10 LOC)
  • " *.json" is biggest, containing 74.28% of LOC.
  • " *.ini" is smallest, containing 0.02% of LOC.


*.json35931 LOC (74%) 49 files
*.properties4970 LOC (10%) 192 files
*.md2797 LOC (5%) 27 files
*.py1838 LOC (3%) 11 files
*.txt1057 LOC (2%) 11 files
*.po689 LOC (1%) 3 files
*.svg687 LOC (1%) 8 files
*.xsd251 LOC (<1%) 3 files
*.xml145 LOC (<1%) 4 files
*.ini10 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 15:35