opensearch-project / sql
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
g4
snap
ini
cmake
properties
reg
TXT
in
clang-format
policy
resx
  • 36 extensions are included in analyses: java, json, md, h, txt, rst, cpp, c, ts, py, yml, tsx, js, gradle, ps1, sh, xml, g4, snap, ini, gitignore, bat, svg, cmake, properties, scss, reg, TXT, html, yaml, in, clang-format, less, policy, hpp, resx
  • 9 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (36 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (2 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (2 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (83 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 ".*[.]resx" (The resx resource files) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (76 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.

main96094 LOC (40%) 956 files
test106261 LOC (45%) 574 files
generated0 LOC (0%) 0 files
build and deployment1498 LOC (<1%) 28 files
other30938 LOC (13%) 209 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
g4
cmake
txt
policy
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 956 files match defined criteria (96,094 lines of code, 100.0% vs. main code):
    • 763 *.java files (50,758 lines of code)
    • 30 *.c files (18,851 lines of code)
    • 72 *.h files (13,643 lines of code)
    • 17 *.cpp files (4,655 lines of code)
    • 10 *.tsx files (2,268 lines of code)
    • 7 *.g4 files (1,955 lines of code)
    • 1 *.hpp files (1,069 lines of code)
    • 3 *.cmake files (596 lines of code)
    • 12 *.py files (595 lines of code)
    • 17 *.ts files (521 lines of code)
    • 1 *.html files (356 lines of code)
    • 2 *.txt files (318 lines of code)
    • 2 *.scss files (218 lines of code)
    • 6 *.js files (125 lines of code)
    • 9 *.ps1 files (124 lines of code)
    • 1 *.yaml files (27 lines of code)
    • 1 *.policy files (10 lines of code)
    • 1 *.less files (3 lines of code)
    • 1 *.in files (2 lines of code)
  • " *.java" is biggest, containing 52.82% of code.
  • " *.in" is smallest, containing 0% of code.


*.java50758 LOC (52%) 763 files
*.c18851 LOC (19%) 30 files
*.h13643 LOC (14%) 72 files
*.cpp4655 LOC (4%) 17 files
*.tsx2268 LOC (2%) 10 files
*.g41955 LOC (2%) 7 files
*.hpp1069 LOC (1%) 1 files
*.cmake596 LOC (<1%) 3 files
*.py595 LOC (<1%) 12 files
*.ts521 LOC (<1%) 17 files
*.html356 LOC (<1%) 1 files
*.txt318 LOC (<1%) 2 files
*.scss218 LOC (<1%) 2 files
*.js125 LOC (<1%) 6 files
*.ps1124 LOC (<1%) 9 files
*.yaml27 LOC (<1%) 1 files
*.policy10 LOC (<1%) 1 files
*.less3 LOC (<1%) 1 files
*.in2 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
reg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/UnitTests?/.*".
    • files with paths like ".*/IntegrationTests?/.*".
    • files with paths like ".*[.]spec[.]js".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*UnitTests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 574 files match defined criteria (106,261 lines of code, 110.6% vs. main code):
    • 495 *.java files (65,043 lines of code)
    • 7 *.snap files (35,198 lines of code)
    • 29 *.cpp files (3,908 lines of code)
    • 10 *.py files (867 lines of code)
    • 7 *.tsx files (608 lines of code)
    • 2 *.js files (460 lines of code)
    • 15 *.h files (100 lines of code)
    • 7 *.ts files (48 lines of code)
    • 2 *.reg files (29 lines of code)
  • " *.java" is biggest, containing 61.21% of code.
  • " *.reg" is smallest, containing 0.03% of code.


*.java65043 LOC (61%) 495 files
*.snap35198 LOC (33%) 7 files
*.cpp3908 LOC (3%) 29 files
*.py867 LOC (<1%) 10 files
*.tsx608 LOC (<1%) 7 files
*.js460 LOC (<1%) 2 files
*.h100 LOC (<1%) 15 files
*.ts48 LOC (<1%) 7 files
*.reg29 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 ".*[.]gradle".
    • 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 ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 28 files match defined criteria (1,498 lines of code, 1.6% vs. main code):
    • 15 *.gradle files (1,169 lines of code)
    • 4 *.bat files (173 lines of code)
    • 8 *.sh files (120 lines of code)
    • 1 *.js files (36 lines of code)
  • " *.gradle" is biggest, containing 78.04% of code.
  • " *.js" is smallest, containing 2.4% of code.


*.gradle1169 LOC (78%) 15 files
*.bat173 LOC (11%) 4 files
*.sh120 LOC (8%) 8 files
*.js36 LOC (2%) 1 files
Other Code
ini
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/COPYING[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/config/checkstyle/.*".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 209 files match defined criteria (30,938 lines of code, 32.2% vs. main code):
    • 107 *.json files (27,856 lines of code)
    • 73 *.md files (2,086 lines of code)
    • 7 *.xml files (496 lines of code)
    • 12 *.rst files (411 lines of code)
    • 3 *.svg files (47 lines of code)
    • 6 *.ini files (38 lines of code)
    • 1 *.properties files (4 lines of code)
  • " *.json" is biggest, containing 90.04% of code.
  • " *.properties" is smallest, containing 0.01% of code.


*.json27856 LOC (90%) 107 files
*.md2086 LOC (6%) 73 files
*.xml496 LOC (1%) 7 files
*.rst411 LOC (1%) 12 files
*.svg47 LOC (<1%) 3 files
*.ini38 LOC (<1%) 6 files
*.properties4 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)
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
  • *.h files are analyzed with CppAnalyzer:
    • 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
  • *.cpp files are analyzed with CppAnalyzer:
    • 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
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.g4 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
  • *.hpp files are analyzed with CppAnalyzer:
    • 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
  • *.cmake 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
  • *.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
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
  • *.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
  • *.txt 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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.ps1 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
  • *.yaml 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
  • *.policy 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
  • *.less files are analyzed with LessAnalyzer:
    • 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
  • *.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


2022-02-01 05:02