alibaba / druid
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
pks
pkb
cmd
xsd
editorconfig
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.

main248486 LOC (53%) 1,845 files
test182500 LOC (39%) 3,690 files
generated21 LOC (<1%) 1 file
build and deployment1811 LOC (<1%) 13 files
other32752 LOC (7%) 519 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 ".*".
  • 1845 files match defined criteria (248,486 LOC, 100.0% vs. main code):
    • 1,631 *.java files (225,673 LOC)
    • 149 *.sql files (7,481 LOC)
    • 3 *.css files (7,221 LOC)
    • 50 *.html files (6,169 LOC)
    • 6 *.js files (1,322 LOC)
    • 2 *.xml files (316 LOC)
    • 4 *.scss files (304 LOC)
  • " *.java" is biggest, containing 90.82% of LOC.
  • " *.scss" is smallest, containing 0.12% of LOC.


*.java225673 LOC (90%) 1,631 files
*.sql7481 LOC (3%) 149 files
*.css7221 LOC (2%) 3 files
*.html6169 LOC (2%) 50 files
*.js1322 LOC (<1%) 6 files
*.xml316 LOC (<1%) 2 files
*.scss304 LOC (<1%) 4 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pkb
pks
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 ".*_tests[.].*".
    • files with paths like ".*[-]tests/.*".
  • 3690 files match defined criteria (182,500 LOC, 73.4% vs. main code):
    • 3,395 *.java files (169,081 LOC)
    • 269 *.sql files (12,984 LOC)
    • 11 *.xml files (276 LOC)
    • 7 *.pkb files (93 LOC)
    • 8 *.pks files (66 LOC)
  • " *.java" is biggest, containing 92.65% of LOC.
  • " *.pks" is smallest, containing 0.04% of LOC.


*.java169081 LOC (92%) 3,395 files
*.sql12984 LOC (7%) 269 files
*.xml276 LOC (<1%) 11 files
*.pkb93 LOC (<1%) 7 files
*.pks66 LOC (<1%) 8 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[.][a-z]+".
  • 1 file matches defined criteria (21 LOC, 0.0% vs. main code). All matches are in *.java files.


*.java21 LOC (100%) 1 file
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 ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]gradle".
  • 13 files match defined criteria (1,811 LOC, 0.7% vs. main code):
    • 7 *.xml files (1,683 LOC)
    • 2 *.bat files (85 LOC)
    • 2 *.gradle files (36 LOC)
    • 2 *.sh files (7 LOC)
  • " *.xml" is biggest, containing 92.93% of LOC.
  • " *.sh" is smallest, containing 0.39% of LOC.


*.xml1683 LOC (92%) 7 files
*.bat85 LOC (4%) 2 files
*.gradle36 LOC (1%) 2 files
*.sh7 LOC (<1%) 2 files
Other Code
txt
properties
xsd
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 ".*/[.]gitignore".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/resources/.*[.]xsd".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 519 files match defined criteria (32,752 LOC, 13.2% vs. main code):
    • 204 *.txt files (15,760 LOC)
    • 2 *.svg files (9,158 LOC)
    • 203 *.sql files (3,929 LOC)
    • 64 *.java files (1,999 LOC)
    • 7 *.md files (847 LOC)
    • 33 *.properties files (495 LOC)
    • 2 *.json files (432 LOC)
    • 3 *.xml files (118 LOC)
    • 1 *.xsd files (14 LOC)
  • " *.txt" is biggest, containing 48.12% of LOC.
  • " *.xsd" is smallest, containing 0.04% of LOC.


*.txt15760 LOC (48%) 204 files
*.svg9158 LOC (27%) 2 files
*.sql3929 LOC (11%) 203 files
*.java1999 LOC (6%) 64 files
*.md847 LOC (2%) 7 files
*.properties495 LOC (1%) 33 files
*.json432 LOC (1%) 2 files
*.xml118 LOC (<1%) 3 files
*.xsd14 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-14 18:52