elastic / apm-agent-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
txt
feature
asc
proto
jade
tpl
editorconfig
cmd
gitattributes
policy
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.

main79181 LOC (47%) 1,217 files
test69354 LOC (41%) 955 files
generated2675 LOC (1%) 12 files
build and deployment9171 LOC (5%) 150 files
other7464 LOC (4%) 80 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1217 files match defined criteria (79,181 LOC, 100.0% vs. main code):
    • 1,211 *.java files (78,824 LOC)
    • 2 *.yaml files (247 LOC)
    • 2 *.xml files (65 LOC)
    • 2 *.asc files (45 LOC)
  • " *.java" is biggest, containing 99.55% of LOC.
  • " *.asc" is smallest, containing 0.06% of LOC.


*.java78824 LOC (99%) 1,211 files
*.yaml247 LOC (<1%) 2 files
*.xml65 LOC (<1%) 2 files
*.asc45 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
feature
policy
asc
proto
tpl
jade
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • 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 ".*/[Ss]pecs/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[.]feature".
  • 955 files match defined criteria (69,354 LOC, 87.6% vs. main code):
    • 830 *.java files (64,704 LOC)
    • 81 *.xml files (3,320 LOC)
    • 6 *.feature files (497 LOC)
    • 1 *.policy files (231 LOC)
    • 1 *.scala files (198 LOC)
    • 4 *.asc files (128 LOC)
    • 8 *.jsp files (65 LOC)
    • 4 *.xhtml files (60 LOC)
    • 2 *.proto files (42 LOC)
    • 3 *.ftl files (40 LOC)
    • 9 *.html files (37 LOC)
    • 2 *.tpl files (22 LOC)
    • 2 *.jade files (8 LOC)
    • 2 *.js files (2 LOC)
  • " *.java" is biggest, containing 93.3% of LOC.
  • " *.js" is smallest, containing 0% of LOC.


*.java64704 LOC (93%) 830 files
*.xml3320 LOC (4%) 81 files
*.feature497 LOC (<1%) 6 files
*.policy231 LOC (<1%) 1 file
*.scala198 LOC (<1%) 1 file
*.asc128 LOC (<1%) 4 files
*.jsp65 LOC (<1%) 8 files
*.xhtml60 LOC (<1%) 4 files
*.proto42 LOC (<1%) 2 files
*.ftl40 LOC (<1%) 3 files
*.html37 LOC (<1%) 9 files
*.tpl22 LOC (<1%) 2 files
*.jade8 LOC (<1%) 2 files
*.js2 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 paths like ".*/generated/.*".
    • files with any line of content like "//[ ]*Generated by .*".
  • 12 files match defined criteria (2,675 LOC, 3.4% vs. main code). All matches are in *.java files.


*.java2675 LOC (100%) 12 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".
    • files with paths like ".*/[.]gitattributes".
  • 150 files match defined criteria (9,171 LOC, 11.6% vs. main code):
    • 145 *.xml files (9,005 LOC)
    • 5 *.sh files (166 LOC)
  • " *.xml" is biggest, containing 98.19% of LOC.
  • " *.sh" is smallest, containing 1.81% of LOC.


*.xml9005 LOC (98%) 145 files
*.sh166 LOC (1%) 5 files
Other Code
properties
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
  • 80 files match defined criteria (7,464 LOC, 9.4% vs. main code):
    • 33 *.json files (6,643 LOC)
    • 20 *.md files (707 LOC)
    • 22 *.properties files (93 LOC)
    • 5 *.txt files (21 LOC)
  • " *.json" is biggest, containing 89% of LOC.
  • " *.txt" is smallest, containing 0.28% of LOC.


*.json6643 LOC (89%) 33 files
*.md707 LOC (9%) 20 files
*.properties93 LOC (1%) 22 files
*.txt21 LOC (<1%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 19:43