aws / sagemaker-spark
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
in
ini
cfg
properties
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.

main7348 LOC (30%) 66 files
test8192 LOC (33%) 38 files
generated5040 LOC (20%) 1 file
build and deployment0 LOC (0%) 0 files
other3775 LOC (15%) 13 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 66 files match defined criteria (7,348 LOC, 100.0% vs. main code):
    • 24 *.py files (3,450 LOC)
    • 34 *.scala files (3,431 LOC)
    • 2 *.proto files (206 LOC)
    • 1 *.xml files (120 LOC)
    • 2 *.sbt files (91 LOC)
    • 1 *.java files (38 LOC)
    • 1 *.cfg files (7 LOC)
    • 1 *.in files (5 LOC)
  • " *.py" is biggest, containing 46.95% of LOC.
  • " *.in" is smallest, containing 0.07% of LOC.


*.py3450 LOC (46%) 24 files
*.scala3431 LOC (46%) 34 files
*.proto206 LOC (2%) 2 files
*.xml120 LOC (1%) 1 file
*.sbt91 LOC (1%) 2 files
*.java38 LOC (<1%) 1 file
*.cfg7 LOC (<1%) 1 file
*.in5 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 38 files match defined criteria (8,192 LOC, 111.5% vs. main code):
    • 23 *.scala files (5,215 LOC)
    • 15 *.py files (2,977 LOC)
  • " *.scala" is biggest, containing 63.66% of LOC.
  • " *.py" is smallest, containing 36.34% of LOC.


*.scala5215 LOC (63%) 23 files
*.py2977 LOC (36%) 15 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 .*".
    • files with paths like ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 1 file matches defined criteria (5,040 LOC, 68.6% vs. main code). All matches are in *.java files.


*.java5040 LOC (100%) 1 file
Other Code
txt
ini
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
  • 13 files match defined criteria (3,775 LOC, 51.4% vs. main code):
    • 4 *.txt files (2,601 LOC)
    • 5 *.md files (703 LOC)
    • 1 *.rst files (265 LOC)
    • 1 *.ipynb files (145 LOC)
    • 1 *.ini files (60 LOC)
    • 1 *.properties files (1 LOC)
  • " *.txt" is biggest, containing 68.9% of LOC.
  • " *.properties" is smallest, containing 0.03% of LOC.


*.txt2601 LOC (68%) 4 files
*.md703 LOC (18%) 5 files
*.rst265 LOC (7%) 1 file
*.ipynb145 LOC (3%) 1 file
*.ini60 LOC (1%) 1 file
*.properties1 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-03 23:53