aws-amplify / aws-sdk-android
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
tst
txt
pls
pro
  • 17 extensions are included in analyses: java, xml, properties, gradle, py, gitignore, tst, txt, md, json, sh, html, pls, yml, css, pro, bat
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (17 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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) (4 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.

main773239 LOC (94%) 11508 files
test44816 LOC (5%) 379 files
generated0 LOC (0%) 0 files
build and deployment1336 LOC (<1%) 60 files
other3024 LOC (<1%) 220 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pro
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 11508 files match defined criteria (773,239 lines of code, 100.0% vs. main code):
    • 11,483 *.java files (771,545 lines of code)
    • 19 *.py files (990 lines of code)
    • 1 *.css files (554 lines of code)
    • 4 *.html files (136 lines of code)
    • 1 *.pro files (14 lines of code)
  • " *.java" is biggest, containing 99.78% of code.
  • " *.pro" is smallest, containing 0% of code.


*.java771545 LOC (99%) 11483 files
*.py990 LOC (<1%) 19 files
*.css554 LOC (<1%) 1 files
*.html136 LOC (<1%) 4 files
*.pro14 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
tst
pls
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*[-]test[-].*".
    • files with any line of content like ".*/simpletest/.*".
  • 379 files match defined criteria (44,816 lines of code, 5.8% vs. main code):
    • 365 *.java files (44,485 lines of code)
    • 1 *.sh files (207 lines of code)
    • 11 *.tst files (99 lines of code)
    • 2 *.pls files (25 lines of code)
  • " *.java" is biggest, containing 99.26% of code.
  • " *.pls" is smallest, containing 0.06% of code.


*.java44485 LOC (99%) 365 files
*.sh207 LOC (<1%) 1 files
*.tst99 LOC (<1%) 11 files
*.pls25 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 ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
  • 60 files match defined criteria (1,336 lines of code, 0.2% vs. main code):
    • 54 *.gradle files (1,154 lines of code)
    • 5 *.sh files (121 lines of code)
    • 1 *.bat files (61 lines of code)
  • " *.gradle" is biggest, containing 86.38% of code.
  • " *.bat" is smallest, containing 4.57% of code.


*.gradle1154 LOC (86%) 54 files
*.sh121 LOC (9%) 5 files
*.bat61 LOC (4%) 1 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 220 files match defined criteria (3,024 lines of code, 0.4% vs. main code):
    • 156 *.xml files (2,057 lines of code)
    • 6 *.json files (402 lines of code)
    • 3 *.md files (334 lines of code)
    • 55 *.properties files (231 lines of code)
  • " *.xml" is biggest, containing 68.02% of code.
  • " *.properties" is smallest, containing 7.64% of code.


*.xml2057 LOC (68%) 156 files
*.json402 LOC (13%) 6 files
*.md334 LOC (11%) 3 files
*.properties231 LOC (7%) 55 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)
  • *.py files are analyzed with PythonAnalyzer:
    • 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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.pro 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


2022-02-01 01:46