awslabs / aws-serverless-java-container
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
  • 12 extensions are included in analyses: java, xml, md, yml, properties, gradle, txt, sh, html, yaml, gitignore, json
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (5 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main8347 LOC (35%) 94 files
test7722 LOC (33%) 106 files
generated0 LOC (0%) 0 files
build and deployment241 LOC (1%) 6 files
other6985 LOC (29%) 132 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 ".*".
  • 94 files match defined criteria (8,347 lines of code, 100.0% vs. main code):
    • 89 *.java files (8,192 lines of code)
    • 5 *.yml files (155 lines of code)
  • " *.java" is biggest, containing 98.14% of code.
  • " *.yml" is smallest, containing 1.86% of code.


*.java8192 LOC (98%) 89 files
*.yml155 LOC (1%) 5 files
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]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 106 files match defined criteria (7,722 lines of code, 92.5% vs. main code):
    • 104 *.java files (7,712 lines of code)
    • 2 *.html files (10 lines of code)
  • " *.java" is biggest, containing 99.87% of code.
  • " *.html" is smallest, containing 0.13% of code.


*.java7712 LOC (99%) 104 files
*.html10 LOC (<1%) 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 ".*[.]gradle".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 6 files match defined criteria (241 lines of code, 2.9% vs. main code):
    • 5 *.gradle files (159 lines of code)
    • 1 *.sh files (82 lines of code)
  • " *.gradle" is biggest, containing 65.98% of code.
  • " *.sh" is smallest, containing 34.02% of code.


*.gradle159 LOC (65%) 5 files
*.sh82 LOC (34%) 1 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 132 files match defined criteria (6,985 lines of code, 83.7% vs. main code):
    • 49 *.xml files (4,130 lines of code)
    • 36 *.java files (1,666 lines of code)
    • 15 *.md files (706 lines of code)
    • 7 *.gradle files (207 lines of code)
    • 7 *.yml files (151 lines of code)
    • 2 *.yaml files (63 lines of code)
    • 13 *.properties files (36 lines of code)
    • 3 *.sh files (26 lines of code)
  • " *.xml" is biggest, containing 59.13% of code.
  • " *.sh" is smallest, containing 0.37% of code.


*.xml4130 LOC (59%) 49 files
*.java1666 LOC (23%) 36 files
*.md706 LOC (10%) 15 files
*.gradle207 LOC (2%) 7 files
*.yml151 LOC (2%) 7 files
*.yaml63 LOC (<1%) 2 files
*.properties36 LOC (<1%) 13 files
*.sh26 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.java files are analyzed with JavaAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis (based on package names)
  • *.yml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-01-31 18:08