apache / skywalking-java
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
proto
txt
gitmodules
cmd
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.

main74522 LOC (39%) 1,788 files
test100765 LOC (53%) 2,155 files
generated1736 LOC (<1%) 2 files
build and deployment7381 LOC (3%) 220 files
other4028 LOC (2%) 74 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 ".*".
  • 1788 files match defined criteria (74,522 LOC, 100.0% vs. main code):
    • 1,783 *.java files (74,259 LOC)
    • 3 *.xml files (202 LOC)
    • 1 *.py files (32 LOC)
    • 1 *.scala files (29 LOC)
  • " *.java" is biggest, containing 99.65% of LOC.
  • " *.scala" is smallest, containing 0.04% of LOC.


*.java74259 LOC (99%) 1,783 files
*.xml202 LOC (<1%) 3 files
*.py32 LOC (<1%) 1 file
*.scala29 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
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 ".*/e2e/.*".
  • 2155 files match defined criteria (100,765 LOC, 135.2% vs. main code):
    • 1,155 *.java files (51,721 LOC)
    • 516 *.xml files (23,950 LOC)
    • 237 *.yaml files (21,881 LOC)
    • 218 *.yml files (2,073 LOC)
    • 11 *.sh files (843 LOC)
    • 4 *.proto files (135 LOC)
    • 5 *.kt files (105 LOC)
    • 2 *.scala files (18 LOC)
    • 2 *.jsp files (18 LOC)
    • 3 *.thrift files (13 LOC)
    • 2 *.sbt files (8 LOC)
  • " *.java" is biggest, containing 51.33% of LOC.
  • " *.sbt" is smallest, containing 0.01% of LOC.


*.java51721 LOC (51%) 1,155 files
*.xml23950 LOC (23%) 516 files
*.yaml21881 LOC (21%) 237 files
*.yml2073 LOC (2%) 218 files
*.sh843 LOC (<1%) 11 files
*.proto135 LOC (<1%) 4 files
*.kt105 LOC (<1%) 5 files
*.scala18 LOC (<1%) 2 files
*.jsp18 LOC (<1%) 2 files
*.thrift13 LOC (<1%) 3 files
*.sbt8 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 .*".
  • 2 files match defined criteria (1,736 LOC, 2.3% vs. main code). All matches are in *.java files.


*.java1736 LOC (100%) 2 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 ".*/assembly[.]xml".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
  • 220 files match defined criteria (7,381 LOC, 9.9% vs. main code):
    • 217 *.xml files (7,296 LOC)
    • 3 *.sh files (85 LOC)
  • " *.xml" is biggest, containing 98.85% of LOC.
  • " *.sh" is smallest, containing 1.15% of LOC.


*.xml7296 LOC (98%) 217 files
*.sh85 LOC (1%) 3 files
Other Code
properties
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]gitignore".
  • 74 files match defined criteria (4,028 LOC, 5.4% vs. main code):
    • 24 *.md files (1,914 LOC)
    • 12 *.json files (1,407 LOC)
    • 37 *.properties files (683 LOC)
    • 1 *.txt files (24 LOC)
  • " *.md" is biggest, containing 47.52% of LOC.
  • " *.txt" is smallest, containing 0.6% of LOC.


*.md1914 LOC (47%) 24 files
*.json1407 LOC (34%) 12 files
*.properties683 LOC (16%) 37 files
*.txt24 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2023-08-11 02:18