apache / cassandra
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
cql
txt
properties
spec
diff
asc
mod
patch
textile
gitmodules
jflex
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.

main470994 LOC (47%) 3,185 files
test446727 LOC (44%) 2,632 files
generated4309 LOC (<1%) 14 files
build and deployment2373 LOC (<1%) 8 files
other77225 LOC (7%) 690 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
textile
jflex
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3185 files match defined criteria (470,994 LOC, 100.0% vs. main code):
    • 3,137 *.java files (454,917 LOC)
    • 18 *.py files (6,440 LOC)
    • 4 *.spec files (3,263 LOC)
    • 3 *.g files (2,584 LOC)
    • 1 *.textile files (2,024 LOC)
    • 13 *.xml files (1,062 LOC)
    • 6 *.yaml files (443 LOC)
    • 1 *.jflex files (190 LOC)
    • 1 *.css files (69 LOC)
    • 1 *.py3 files (2 LOC)
  • " *.java" is biggest, containing 96.59% of LOC.
  • " *.py3" is smallest, containing 0% of LOC.


*.java454917 LOC (96%) 3,137 files
*.py6440 LOC (1%) 18 files
*.spec3263 LOC (<1%) 4 files
*.g2584 LOC (<1%) 3 files
*.textile2024 LOC (<1%) 1 file
*.xml1062 LOC (<1%) 13 files
*.yaml443 LOC (<1%) 6 files
*.jflex190 LOC (<1%) 1 file
*.css69 LOC (<1%) 1 file
*.py32 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cql
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
  • 2632 files match defined criteria (446,727 LOC, 94.8% vs. main code):
    • 2,569 *.java files (441,075 LOC)
    • 13 *.py files (3,029 LOC)
    • 31 *.yaml files (1,780 LOC)
    • 10 *.xml files (401 LOC)
    • 2 *.cql files (325 LOC)
    • 6 *.sh files (100 LOC)
    • 1 *.mod files (17 LOC)
  • " *.java" is biggest, containing 98.73% of LOC.
  • " *.mod" is smallest, containing 0% of LOC.


*.java441075 LOC (98%) 2,569 files
*.py3029 LOC (<1%) 13 files
*.yaml1780 LOC (<1%) 31 files
*.xml401 LOC (<1%) 10 files
*.cql325 LOC (<1%) 2 files
*.sh100 LOC (<1%) 6 files
*.mod17 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 .*".
  • 14 files match defined criteria (4,309 LOC, 0.9% vs. main code). All matches are in *.svg files.


*.svg4309 LOC (100%) 14 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 ".*[.]sh".
    • files with paths like ".*/build[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
  • 8 files match defined criteria (2,373 LOC, 0.5% vs. main code):
    • 1 *.xml files (1,792 LOC)
    • 7 *.sh files (581 LOC)
  • " *.xml" is biggest, containing 75.52% of LOC.
  • " *.sh" is smallest, containing 24.48% of LOC.


*.xml1792 LOC (75%) 1 file
*.sh581 LOC (24%) 7 files
Other Code
txt
cql
properties
asc
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 ".*[.]patch".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]adoc".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 690 files match defined criteria (77,225 LOC, 16.4% vs. main code):
    • 218 *.adoc files (28,079 LOC)
    • 22 *.svg files (21,389 LOC)
    • 149 *.txt files (18,601 LOC)
    • 16 *.md files (4,386 LOC)
    • 203 *.cql files (3,073 LOC)
    • 9 *.java files (937 LOC)
    • 9 *.properties files (285 LOC)
    • 2 *.xml files (120 LOC)
    • 2 *.asc files (96 LOC)
    • 5 *.yaml files (78 LOC)
    • 2 *.rst files (71 LOC)
    • 47 *.sh files (58 LOC)
    • 6 *.json files (52 LOC)
  • " *.adoc" is biggest, containing 36.36% of LOC.
  • " *.json" is smallest, containing 0.07% of LOC.


*.adoc28079 LOC (36%) 218 files
*.svg21389 LOC (27%) 22 files
*.txt18601 LOC (24%) 149 files
*.md4386 LOC (5%) 16 files
*.cql3073 LOC (3%) 203 files
*.java937 LOC (1%) 9 files
*.properties285 LOC (<1%) 9 files
*.xml120 LOC (<1%) 2 files
*.asc96 LOC (<1%) 2 files
*.yaml78 LOC (<1%) 5 files
*.rst71 LOC (<1%) 2 files
*.sh58 LOC (<1%) 47 files
*.json52 LOC (<1%) 6 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 15:20