awslabs / aws-mysql-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
properties
txt
in
wxs
pub
  • 17 extensions are included in analyses: java, properties, md, yml, js, html, kts, txt, xml, css, in, gitignore, sql, wxs, bat, json, pub
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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) (1 file).
    • 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.

main69200 LOC (34%) 552 files
test72894 LOC (36%) 146 files
generated54773 LOC (27%) 13 files
build and deployment124 LOC (<1%) 2 files
other1792 LOC (<1%) 25 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
wxs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 552 files match defined criteria (69,200 lines of code, 100.0% vs. main code):
    • 546 *.java files (68,721 lines of code)
    • 2 *.kts files (266 lines of code)
    • 1 *.in files (150 lines of code)
    • 1 *.wxs files (37 lines of code)
    • 2 *.html files (26 lines of code)
  • " *.java" is biggest, containing 99.31% of code.
  • " *.html" is smallest, containing 0.04% of code.


*.java68721 LOC (99%) 546 files
*.kts266 LOC (<1%) 2 files
*.in150 LOC (<1%) 1 files
*.wxs37 LOC (<1%) 1 files
*.html26 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pub
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with any line of content like ".*/simpletest/.*".
  • 146 files match defined criteria (72,894 lines of code, 105.3% vs. main code):
    • 145 *.java files (72,888 lines of code)
    • 1 *.pub files (6 lines of code)
  • " *.java" is biggest, containing 99.99% of code.
  • " *.pub" is smallest, containing 0.01% of code.


*.java72888 LOC (99%) 145 files
*.pub6 LOC (<1%) 1 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/.*".
  • 13 files match defined criteria (54,773 lines of code, 79.2% vs. main code). All matches are in *.java files.


*.java54773 LOC (100%) 13 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 ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/docker[-]compose[.]yml".
  • 2 files match defined criteria (124 lines of code, 0.2% vs. main code):
    • 1 *.bat files (68 lines of code)
    • 1 *.yml files (56 lines of code)
  • " *.bat" is biggest, containing 54.84% of code.
  • " *.yml" is smallest, containing 45.16% of code.


*.bat68 LOC (54%) 1 files
*.yml56 LOC (45%) 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 ".*/config/checkstyle/.*".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 25 files match defined criteria (1,792 lines of code, 2.6% vs. main code):
    • 10 *.properties files (759 lines of code)
    • 4 *.md files (363 lines of code)
    • 2 *.xml files (340 lines of code)
    • 8 *.java files (329 lines of code)
    • 1 *.sql files (1 lines of code)
  • " *.properties" is biggest, containing 42.35% of code.
  • " *.sql" is smallest, containing 0.06% of code.


*.properties759 LOC (42%) 10 files
*.md363 LOC (20%) 4 files
*.xml340 LOC (18%) 2 files
*.java329 LOC (18%) 8 files
*.sql1 LOC (<1%) 1 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)
  • *.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)
  • *.in files are analyzed with RustAnalyzer:
    • 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
    • No dependency analysis
  • *.wxs files are analyzed with XmlAnalyzer:
    • 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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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


2022-01-31 19:36