microsoft / azure-tools-for-java
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
feature
txt
xsl
cmd
  • 24 extensions are included in analyses: java, kt, svg, xml, properties, scala, json, js, feature, gradle, css, txt, md, groovy, gitignore, xhtml, bat, yml, html, sh, MD, xsl, kts, cmd
  • 13 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (16 files).
    • exclude files with path like ".*/dependencies/.*" (Dependencies) (1 file).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (3 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (1 file).
    • exclude files with path like ".*/cache/.*" (Caches) (6 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (2 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*/mvnw\.cmd" (Maven) (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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (5 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (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.

main147662 LOC (87%) 2086 files
test5224 LOC (3%) 100 files
generated0 LOC (0%) 0 files
build and deployment1066 LOC (<1%) 28 files
other15174 LOC (8%) 313 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xsl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 2086 files match defined criteria (147,662 lines of code, 100.0% vs. main code):
    • 1,817 *.java files (131,947 lines of code)
    • 186 *.kt files (8,158 lines of code)
    • 18 *.js files (2,816 lines of code)
    • 11 *.css files (1,607 lines of code)
    • 32 *.scala files (1,508 lines of code)
    • 1 *.yml files (489 lines of code)
    • 3 *.html files (330 lines of code)
    • 8 *.groovy files (285 lines of code)
    • 1 *.xsl files (214 lines of code)
    • 6 *.xhtml files (176 lines of code)
    • 2 *.md files (95 lines of code)
    • 1 *.kts files (37 lines of code)
  • " *.java" is biggest, containing 89.36% of code.
  • " *.kts" is smallest, containing 0.03% of code.


*.java131947 LOC (89%) 1817 files
*.kt8158 LOC (5%) 186 files
*.js2816 LOC (1%) 18 files
*.css1607 LOC (1%) 11 files
*.scala1508 LOC (1%) 32 files
*.yml489 LOC (<1%) 1 files
*.html330 LOC (<1%) 3 files
*.groovy285 LOC (<1%) 8 files
*.xsl214 LOC (<1%) 1 files
*.xhtml176 LOC (<1%) 6 files
*.md95 LOC (<1%) 2 files
*.kts37 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
feature
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.]feature".
    • files with any line of content like ".*/simpletest/.*".
  • 100 files match defined criteria (5,224 lines of code, 3.5% vs. main code):
    • 40 *.java files (2,516 lines of code)
    • 35 *.kt files (1,490 lines of code)
    • 18 *.feature files (721 lines of code)
    • 7 *.scala files (497 lines of code)
  • " *.java" is biggest, containing 48.16% of code.
  • " *.scala" is smallest, containing 9.51% of code.


*.java2516 LOC (48%) 40 files
*.kt1490 LOC (28%) 35 files
*.feature721 LOC (13%) 18 files
*.scala497 LOC (9%) 7 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 ".*/pom[.]xml".
    • files with paths like ".*/build[.]xml".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]mvn/.*".
  • 28 files match defined criteria (1,066 lines of code, 0.7% vs. main code):
    • 22 *.gradle files (779 lines of code)
    • 5 *.bat files (259 lines of code)
    • 1 *.sh files (28 lines of code)
  • " *.gradle" is biggest, containing 73.08% of code.
  • " *.sh" is smallest, containing 2.63% of code.


*.gradle779 LOC (73%) 22 files
*.bat259 LOC (24%) 5 files
*.sh28 LOC (2%) 1 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/config/checkstyle/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 313 files match defined criteria (15,174 lines of code, 10.3% vs. main code):
    • 131 *.xml files (9,317 lines of code)
    • 56 *.properties files (3,740 lines of code)
    • 8 *.md files (1,397 lines of code)
    • 110 *.svg files (634 lines of code)
    • 8 *.json files (86 lines of code)
  • " *.xml" is biggest, containing 61.4% of code.
  • " *.json" is smallest, containing 0.57% of code.


*.xml9317 LOC (61%) 131 files
*.properties3740 LOC (24%) 56 files
*.md1397 LOC (9%) 8 files
*.svg634 LOC (4%) 110 files
*.json86 LOC (<1%) 8 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)
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.xsl 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
  • *.xhtml 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
  • *.md 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)


2022-01-30 13:32