apache / cloudberry-pxf
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
orc
tpl
spec
cfg
ini
mod
mk
hcl
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.

main84135 LOC (58%) 1,760 files
test50171 LOC (34%) 431 files
generated809 LOC (<1%) 1 file
build and deployment1515 LOC (1%) 34 files
other7655 LOC (5%) 165 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
tpl
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1760 files match defined criteria (84,135 LOC, 100.0% vs. main code):
    • 859 *.py files (35,793 LOC)
    • 354 *.java files (28,578 LOC)
    • 33 *.c files (7,665 LOC)
    • 45 *.bash files (3,217 LOC)
    • 3 *.pl files (2,900 LOC)
    • 399 *.sql files (2,528 LOC)
    • 26 *.xml files (1,425 LOC)
    • 4 *.go files (479 LOC)
    • 14 *.h files (458 LOC)
    • 5 *.yaml files (398 LOC)
    • 3 *.tf files (306 LOC)
    • 4 *.spec files (248 LOC)
    • 5 *.tpl files (80 LOC)
    • 1 *.tfvars files (31 LOC)
    • 3 *.rb files (19 LOC)
    • 2 *.cfg files (10 LOC)
  • " *.py" is biggest, containing 42.54% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.py35793 LOC (42%) 859 files
*.java28578 LOC (33%) 354 files
*.c7665 LOC (9%) 33 files
*.bash3217 LOC (3%) 45 files
*.pl2900 LOC (3%) 3 files
*.sql2528 LOC (3%) 399 files
*.xml1425 LOC (1%) 26 files
*.go479 LOC (<1%) 4 files
*.h458 LOC (<1%) 14 files
*.yaml398 LOC (<1%) 5 files
*.tf306 LOC (<1%) 3 files
*.spec248 LOC (<1%) 4 files
*.tpl80 LOC (<1%) 5 files
*.tfvars31 LOC (<1%) 1 file
*.rb19 LOC (<1%) 3 files
*.cfg10 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
orc
cfg
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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
  • 431 files match defined criteria (50,171 LOC, 59.6% vs. main code):
    • 217 *.java files (34,575 LOC)
    • 79 *.py files (7,119 LOC)
    • 17 *.c files (3,004 LOC)
    • 40 *.xml files (1,378 LOC)
    • 8 *.bash files (955 LOC)
    • 4 *.go files (920 LOC)
    • 17 *.avsc files (717 LOC)
    • 4 *.sh files (630 LOC)
    • 12 *.orc files (570 LOC)
    • 7 *.hql files (215 LOC)
    • 24 *.sql files (76 LOC)
    • 2 *.cfg files (12 LOC)
  • " *.java" is biggest, containing 68.91% of LOC.
  • " *.cfg" is smallest, containing 0.02% of LOC.


*.java34575 LOC (68%) 217 files
*.py7119 LOC (14%) 79 files
*.c3004 LOC (5%) 17 files
*.xml1378 LOC (2%) 40 files
*.bash955 LOC (1%) 8 files
*.go920 LOC (1%) 4 files
*.avsc717 LOC (1%) 17 files
*.sh630 LOC (1%) 4 files
*.orc570 LOC (1%) 12 files
*.hql215 LOC (<1%) 7 files
*.sql76 LOC (<1%) 24 files
*.cfg12 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 any line of content like "\<\!\-\-[ ]*Generated by .*".
  • 1 file matches defined criteria (809 LOC, 1.0% vs. main code). All matches are in *.svg files.


*.svg809 LOC (100%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
  • 34 files match defined criteria (1,515 LOC, 1.8% vs. main code):
    • 20 *.sh files (534 LOC)
    • 11 *.gradle files (519 LOC)
    • 1 *.xml files (386 LOC)
    • 1 *.bat files (68 LOC)
    • 1 *.mk files (8 LOC)
  • " *.sh" is biggest, containing 35.25% of LOC.
  • " *.mk" is smallest, containing 0.53% of LOC.


*.sh534 LOC (35%) 20 files
*.gradle519 LOC (34%) 11 files
*.xml386 LOC (25%) 1 file
*.bat68 LOC (4%) 1 file
*.mk8 LOC (<1%) 1 file
Other Code
properties
txt
mod
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/go[.]mod".
  • 165 files match defined criteria (7,655 LOC, 9.1% vs. main code):
    • 35 *.md files (3,513 LOC)
    • 86 *.json files (2,248 LOC)
    • 1 *.svg files (809 LOC)
    • 12 *.properties files (526 LOC)
    • 21 *.txt files (334 LOC)
    • 7 *.java files (173 LOC)
    • 1 *.mod files (32 LOC)
    • 2 *.ini files (20 LOC)
  • " *.md" is biggest, containing 45.89% of LOC.
  • " *.ini" is smallest, containing 0.26% of LOC.


*.md3513 LOC (45%) 35 files
*.json2248 LOC (29%) 86 files
*.svg809 LOC (10%) 1 file
*.properties526 LOC (6%) 12 files
*.txt334 LOC (4%) 21 files
*.java173 LOC (2%) 7 files
*.mod32 LOC (<1%) 1 file
*.ini20 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:54