GoogleCloudPlatform / DataflowTemplates
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
proto
properties
pb
mod
cql
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.

main161946 LOC (38%) 1,640 files
test148606 LOC (35%) 916 files
generated0 LOC (0%) 0 files
build and deployment7759 LOC (1%) 81 files
other101902 LOC (24%) 540 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1640 files match defined criteria (161,946 LOC, 100.0% vs. main code):
    • 1,470 *.java files (137,065 LOC)
    • 111 *.tf files (22,290 LOC)
    • 22 *.go files (1,358 LOC)
    • 8 *.py files (412 LOC)
    • 6 *.avsc files (213 LOC)
    • 2 *.sql files (154 LOC)
    • 4 *.proto files (147 LOC)
    • 2 *.yaml files (111 LOC)
    • 8 *.js files (93 LOC)
    • 1 *.bash files (60 LOC)
    • 4 *.ftl files (26 LOC)
    • 2 *.xml files (17 LOC)
  • " *.java" is biggest, containing 84.64% of LOC.
  • " *.xml" is smallest, containing 0.01% of LOC.


*.java137065 LOC (84%) 1,470 files
*.tf22290 LOC (13%) 111 files
*.go1358 LOC (<1%) 22 files
*.py412 LOC (<1%) 8 files
*.avsc213 LOC (<1%) 6 files
*.sql154 LOC (<1%) 2 files
*.proto147 LOC (<1%) 4 files
*.yaml111 LOC (<1%) 2 files
*.js93 LOC (<1%) 8 files
*.bash60 LOC (<1%) 1 file
*.ftl26 LOC (<1%) 4 files
*.xml17 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cql
proto
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 ".*[-]test[-].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]tests/.*".
  • 916 files match defined criteria (148,606 LOC, 91.8% vs. main code):
    • 743 *.java files (141,065 LOC)
    • 114 *.sql files (5,086 LOC)
    • 12 *.go files (1,011 LOC)
    • 7 *.yaml files (454 LOC)
    • 1 *.cql files (323 LOC)
    • 6 *.proto files (266 LOC)
    • 22 *.js files (207 LOC)
    • 6 *.avsc files (119 LOC)
    • 5 *.py files (75 LOC)
  • " *.java" is biggest, containing 94.93% of LOC.
  • " *.py" is smallest, containing 0.05% of LOC.


*.java141065 LOC (94%) 743 files
*.sql5086 LOC (3%) 114 files
*.go1011 LOC (<1%) 12 files
*.yaml454 LOC (<1%) 7 files
*.cql323 LOC (<1%) 1 file
*.proto266 LOC (<1%) 6 files
*.js207 LOC (<1%) 22 files
*.avsc119 LOC (<1%) 6 files
*.py75 LOC (<1%) 5 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 ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 81 files match defined criteria (7,759 LOC, 4.8% vs. main code):
    • 79 *.xml files (7,717 LOC)
    • 2 *.sh files (42 LOC)
  • " *.xml" is biggest, containing 99.46% of LOC.
  • " *.sh" is smallest, containing 0.54% of LOC.


*.xml7717 LOC (99%) 79 files
*.sh42 LOC (<1%) 2 files
Other Code
txt
mod
pb
properties
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*[.]pb".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
  • 540 files match defined criteria (101,902 LOC, 62.9% vs. main code):
    • 260 *.json files (44,626 LOC)
    • 179 *.md files (32,548 LOC)
    • 21 *.txt files (19,209 LOC)
    • 44 *.tf files (3,600 LOC)
    • 22 *.tfvars files (1,264 LOC)
    • 6 *.xml files (520 LOC)
    • 2 *.sh files (71 LOC)
    • 1 *.mod files (28 LOC)
    • 2 *.pb files (24 LOC)
    • 3 *.properties files (12 LOC)
  • " *.json" is biggest, containing 43.79% of LOC.
  • " *.properties" is smallest, containing 0.01% of LOC.


*.json44626 LOC (43%) 260 files
*.md32548 LOC (31%) 179 files
*.txt19209 LOC (18%) 21 files
*.tf3600 LOC (3%) 44 files
*.tfvars1264 LOC (1%) 22 files
*.xml520 LOC (<1%) 6 files
*.sh71 LOC (<1%) 2 files
*.mod28 LOC (<1%) 1 file
*.pb24 LOC (<1%) 2 files
*.properties12 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:34