apache / ambari-metrics
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
nuspec
ini
in
cfg
gitattributes
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.

main36719 LOC (68%) 266 files
test10151 LOC (18%) 75 files
generated0 LOC (0%) 0 files
build and deployment3928 LOC (7%) 25 files
other3153 LOC (5%) 28 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 266 files match defined criteria (36,719 LOC, 100.0% vs. main code):
    • 165 *.java files (18,394 LOC)
    • 12 *.c files (8,289 LOC)
    • 38 *.py files (6,705 LOC)
    • 5 *.js files (1,302 LOC)
    • 19 *.xml files (893 LOC)
    • 14 *.h files (459 LOC)
    • 6 *.ps1 files (436 LOC)
    • 3 *.ts files (140 LOC)
    • 3 *.html files (87 LOC)
    • 1 *.in files (14 LOC)
  • " *.java" is biggest, containing 50.09% of LOC.
  • " *.in" is smallest, containing 0.04% of LOC.


*.java18394 LOC (50%) 165 files
*.c8289 LOC (22%) 12 files
*.py6705 LOC (18%) 38 files
*.js1302 LOC (3%) 5 files
*.xml893 LOC (2%) 19 files
*.h459 LOC (1%) 14 files
*.ps1436 LOC (1%) 6 files
*.ts140 LOC (<1%) 3 files
*.html87 LOC (<1%) 3 files
*.in14 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
  • 75 files match defined criteria (10,151 LOC, 27.6% vs. main code):
    • 59 *.java files (7,593 LOC)
    • 9 *.py files (2,135 LOC)
    • 4 *.xml files (352 LOC)
    • 2 *.cfg files (69 LOC)
    • 1 *.in files (2 LOC)
  • " *.java" is biggest, containing 74.8% of LOC.
  • " *.in" is smallest, containing 0.02% of LOC.


*.java7593 LOC (74%) 59 files
*.py2135 LOC (21%) 9 files
*.xml352 LOC (3%) 4 files
*.cfg69 LOC (<1%) 2 files
*.in2 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
nuspec
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".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]bat".
  • 25 files match defined criteria (3,928 LOC, 10.7% vs. main code):
    • 11 *.xml files (3,622 LOC)
    • 1 *.bat files (158 LOC)
    • 10 *.sh files (76 LOC)
    • 3 *.nuspec files (72 LOC)
  • " *.xml" is biggest, containing 92.21% of LOC.
  • " *.nuspec" is smallest, containing 1.83% of LOC.


*.xml3622 LOC (92%) 11 files
*.bat158 LOC (4%) 1 file
*.sh76 LOC (1%) 10 files
*.nuspec72 LOC (1%) 3 files
Other Code
properties
txt
ini
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 ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 28 files match defined criteria (3,153 LOC, 8.6% vs. main code):
    • 7 *.properties files (1,505 LOC)
    • 11 *.py files (642 LOC)
    • 3 *.txt files (338 LOC)
    • 3 *.ini files (336 LOC)
    • 3 *.md files (311 LOC)
    • 1 *.json files (21 LOC)
  • " *.properties" is biggest, containing 47.73% of LOC.
  • " *.json" is smallest, containing 0.67% of LOC.


*.properties1505 LOC (47%) 7 files
*.py642 LOC (20%) 11 files
*.txt338 LOC (10%) 3 files
*.ini336 LOC (10%) 3 files
*.md311 LOC (9%) 3 files
*.json21 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 17:40