awslabs / aws-postgresql-jdbc
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
po
properties
txt
tpl
  • 22 extensions are included in analyses: java, sh, xml, po, md, yml, properties, kts, gitignore, groovy, js, sbt, bat, json, gradle, css, scala, html, kt, txt, tpl, pl
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (33 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (2 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (3 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) (0 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.

main67934 LOC (63%) 339 files
test37971 LOC (35%) 235 files
generated0 LOC (0%) 0 files
build and deployment433 LOC (<1%) 10 files
other1438 LOC (1%) 26 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
po
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 339 files match defined criteria (67,934 lines of code, 100.0% vs. main code):
    • 305 *.java files (43,321 lines of code)
    • 15 *.po files (22,664 lines of code)
    • 7 *.kts files (1,103 lines of code)
    • 5 *.groovy files (468 lines of code)
    • 1 *.tpl files (124 lines of code)
    • 1 *.pl files (99 lines of code)
    • 1 *.kt files (69 lines of code)
    • 2 *.yml files (67 lines of code)
    • 2 *.sbt files (19 lines of code)
  • " *.java" is biggest, containing 63.77% of code.
  • " *.sbt" is smallest, containing 0.03% of code.


*.java43321 LOC (63%) 305 files
*.po22664 LOC (33%) 15 files
*.kts1103 LOC (1%) 7 files
*.groovy468 LOC (<1%) 5 files
*.tpl124 LOC (<1%) 1 files
*.pl99 LOC (<1%) 1 files
*.kt69 LOC (<1%) 1 files
*.yml67 LOC (<1%) 2 files
*.sbt19 LOC (<1%) 2 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/.*".
  • 235 files match defined criteria (37,971 lines of code, 55.9% vs. main code):
    • 234 *.java files (37,953 lines of code)
    • 1 *.scala files (18 lines of code)
  • " *.java" is biggest, containing 99.95% of code.
  • " *.scala" is smallest, containing 0.05% of code.


*.java37953 LOC (99%) 234 files
*.scala18 LOC (<1%) 1 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 ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/docker[-]compose[.]yml".
  • 10 files match defined criteria (433 lines of code, 0.6% vs. main code):
    • 5 *.sh files (231 lines of code)
    • 2 *.bat files (154 lines of code)
    • 1 *.yml files (27 lines of code)
    • 2 *.gradle files (21 lines of code)
  • " *.sh" is biggest, containing 53.35% of code.
  • " *.gradle" is smallest, containing 4.85% of code.


*.sh231 LOC (53%) 5 files
*.bat154 LOC (35%) 2 files
*.yml27 LOC (6%) 1 files
*.gradle21 LOC (4%) 2 files
Other Code
properties
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 ".*[.]json".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 26 files match defined criteria (1,438 lines of code, 2.1% vs. main code):
    • 9 *.xml files (847 lines of code)
    • 9 *.md files (342 lines of code)
    • 1 *.json files (153 lines of code)
    • 7 *.properties files (96 lines of code)
  • " *.xml" is biggest, containing 58.9% of code.
  • " *.properties" is smallest, containing 6.68% of code.


*.xml847 LOC (58%) 9 files
*.md342 LOC (23%) 9 files
*.json153 LOC (10%) 1 files
*.properties96 LOC (6%) 7 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)
  • *.po files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.kts files are analyzed with KotlinAnalyzer:
    • 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
    • Basic heuristic dependency analysis (based on imports and package statements)
  • *.groovy files are analyzed with GroovyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.tpl files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.kt files are analyzed with KotlinAnalyzer:
    • 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
    • Basic heuristic dependency analysis (based on imports and package statements)
  • *.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
  • *.sbt files are analyzed with ScalaAnalyzer:
    • 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
    • Basic heuristic dependency analysis


2022-01-31 19:38