microsoft / SynapseML
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
properties
in
dockerignore
patch
  • 23 extensions are included in analyses: scala, md, py, txt, ipynb, js, json, svg, css, sh, R, xml, sbt, yml, properties, yaml, Dockerfile, rst, in, gitignore, dockerignore, patch, java
  • 6 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 ".*/docs/.*" (Documentation) (57 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (37 files).
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.

main34173 LOC (37%) 394 files
test17872 LOC (19%) 166 files
generated0 LOC (0%) 0 files
build and deployment24 LOC (<1%) 5 files
other38141 LOC (42%) 260 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 394 files match defined criteria (34,173 lines of code, 100.0% vs. main code):
    • 279 *.scala files (28,332 lines of code)
    • 78 *.py files (2,933 lines of code)
    • 15 *.js files (1,298 lines of code)
    • 3 *.yaml files (688 lines of code)
    • 8 *.css files (383 lines of code)
    • 3 *.dockerfile files (244 lines of code)
    • 4 *.sbt files (145 lines of code)
    • 1 *.java files (97 lines of code)
    • 1 *.r files (40 lines of code)
    • 1 *.yml files (9 lines of code)
    • 1 *.in files (4 lines of code)
  • " *.scala" is biggest, containing 82.91% of code.
  • " *.in" is smallest, containing 0.01% of code.


*.scala28332 LOC (82%) 279 files
*.py2933 LOC (8%) 78 files
*.js1298 LOC (3%) 15 files
*.yaml688 LOC (2%) 3 files
*.css383 LOC (1%) 8 files
*.dockerfile244 LOC (<1%) 3 files
*.sbt145 LOC (<1%) 4 files
*.java97 LOC (<1%) 1 files
*.r40 LOC (<1%) 1 files
*.yml9 LOC (<1%) 1 files
*.in4 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
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 ".*[-]test[-].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 166 files match defined criteria (17,872 lines of code, 52.3% vs. main code):
    • 137 *.scala files (16,474 lines of code)
    • 23 *.py files (1,314 lines of code)
    • 1 *.sh files (52 lines of code)
    • 4 *.r files (28 lines of code)
    • 1 *.in files (4 lines of code)
  • " *.scala" is biggest, containing 92.18% of code.
  • " *.in" is smallest, containing 0.02% of code.


*.scala16474 LOC (92%) 137 files
*.py1314 LOC (7%) 23 files
*.sh52 LOC (<1%) 1 files
*.r28 LOC (<1%) 4 files
*.in4 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
  • 5 files match defined criteria (24 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh24 LOC (100%) 5 files
Other Code
properties
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 260 files match defined criteria (38,141 lines of code, 111.6% vs. main code):
    • 191 *.md files (24,779 lines of code)
    • 37 *.ipynb files (11,586 lines of code)
    • 6 *.svg files (783 lines of code)
    • 12 *.json files (637 lines of code)
    • 5 *.xml files (211 lines of code)
    • 1 *.js files (74 lines of code)
    • 4 *.properties files (34 lines of code)
    • 2 *.rst files (16 lines of code)
    • 1 *.patch files (12 lines of code)
    • 1 *.py files (9 lines of code)
  • " *.md" is biggest, containing 64.97% of code.
  • " *.py" is smallest, containing 0.02% of code.


*.md24779 LOC (64%) 191 files
*.ipynb11586 LOC (30%) 37 files
*.svg783 LOC (2%) 6 files
*.json637 LOC (1%) 12 files
*.xml211 LOC (<1%) 5 files
*.js74 LOC (<1%) 1 files
*.properties34 LOC (<1%) 4 files
*.rst16 LOC (<1%) 2 files
*.patch12 LOC (<1%) 1 files
*.py9 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.scala 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.dockerfile 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
  • *.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
  • *.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)
  • *.r files are analyzed with RAnalyzer:
    • 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
  • *.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
  • *.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-01-30 14:59