microsoft / pmod
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
filters
vcxproj
csproj
xaml
props
mk
txt
cmd
plist
properties
storyboard
targets
proj
pro
resx
in
  • 37 extensions are included in analyses: h, cpp, cs, java, xml, filters, vcxproj, mm, csproj, xaml, props, json, mk, txt, c, gradle, m, inc, cmd, plist, gitignore, properties, storyboard, bat, js, targets, sh, proj, pro, resx, css, ps1, xib, md, html, in, cc
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (3 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (4 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (2 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) (14 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.

main125369 LOC (87%) 1184 files
test5208 LOC (3%) 110 files
generated0 LOC (0%) 0 files
build and deployment628 LOC (<1%) 12 files
other12192 LOC (8%) 276 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
filters
props
proj
targets
cmd
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1184 files match defined criteria (125,369 lines of code, 100.0% vs. main code):
    • 293 *.cpp files (57,094 lines of code)
    • 636 *.h files (52,534 lines of code)
    • 61 *.cs files (4,727 lines of code)
    • 12 *.c files (3,710 lines of code)
    • 21 *.mm files (2,660 lines of code)
    • 67 *.java files (1,826 lines of code)
    • 26 *.vcxproj files (1,372 lines of code)
    • 29 *.filters files (783 lines of code)
    • 12 *.props files (208 lines of code)
    • 10 *.inc files (182 lines of code)
    • 4 *.proj files (120 lines of code)
    • 4 *.targets files (84 lines of code)
    • 6 *.cmd files (22 lines of code)
    • 1 *.cc files (20 lines of code)
    • 1 *.in files (20 lines of code)
    • 1 *.ps1 files (7 lines of code)
  • " *.cpp" is biggest, containing 45.54% of code.
  • " *.ps1" is smallest, containing 0.01% of code.


*.cpp57094 LOC (45%) 293 files
*.h52534 LOC (41%) 636 files
*.cs4727 LOC (3%) 61 files
*.c3710 LOC (2%) 12 files
*.mm2660 LOC (2%) 21 files
*.java1826 LOC (1%) 67 files
*.vcxproj1372 LOC (1%) 26 files
*.filters783 LOC (<1%) 29 files
*.props208 LOC (<1%) 12 files
*.inc182 LOC (<1%) 10 files
*.proj120 LOC (<1%) 4 files
*.targets84 LOC (<1%) 4 files
*.cmd22 LOC (<1%) 6 files
*.cc20 LOC (<1%) 1 files
*.in20 LOC (<1%) 1 files
*.ps17 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
vcxproj
filters
props
xaml
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 110 files match defined criteria (5,208 lines of code, 4.2% vs. main code):
    • 35 *.cpp files (2,306 lines of code)
    • 25 *.cs files (631 lines of code)
    • 4 *.csproj files (516 lines of code)
    • 5 *.vcxproj files (481 lines of code)
    • 6 *.filters files (429 lines of code)
    • 8 *.h files (293 lines of code)
    • 12 *.java files (203 lines of code)
    • 2 *.m files (80 lines of code)
    • 3 *.mm files (66 lines of code)
    • 1 *.bat files (66 lines of code)
    • 2 *.js files (56 lines of code)
    • 3 *.gradle files (49 lines of code)
    • 2 *.props files (18 lines of code)
    • 2 *.xaml files (14 lines of code)
  • " *.cpp" is biggest, containing 44.28% of code.
  • " *.xaml" is smallest, containing 0.27% of code.


*.cpp2306 LOC (44%) 35 files
*.cs631 LOC (12%) 25 files
*.csproj516 LOC (9%) 4 files
*.vcxproj481 LOC (9%) 5 files
*.filters429 LOC (8%) 6 files
*.h293 LOC (5%) 8 files
*.java203 LOC (3%) 12 files
*.m80 LOC (1%) 2 files
*.mm66 LOC (1%) 3 files
*.bat66 LOC (1%) 1 files
*.js56 LOC (1%) 2 files
*.gradle49 LOC (<1%) 3 files
*.props18 LOC (<1%) 2 files
*.xaml14 LOC (<1%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
mk
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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/build[.]xml".
  • 12 files match defined criteria (628 lines of code, 0.5% vs. main code):
    • 3 *.csproj files (295 lines of code)
    • 4 *.sh files (205 lines of code)
    • 5 *.mk files (128 lines of code)
  • " *.csproj" is biggest, containing 46.97% of code.
  • " *.mk" is smallest, containing 20.38% of code.


*.csproj295 LOC (46%) 3 files
*.sh205 LOC (32%) 4 files
*.mk128 LOC (20%) 5 files
Other Code
csproj
vcxproj
xaml
filters
plist
storyboard
mk
props
properties
cmd
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 ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 276 files match defined criteria (12,192 lines of code, 9.7% vs. main code):
    • 50 *.cs files (3,265 lines of code)
    • 16 *.csproj files (1,937 lines of code)
    • 16 *.cpp files (999 lines of code)
    • 9 *.vcxproj files (918 lines of code)
    • 1 *.xib files (779 lines of code)
    • 14 *.java files (693 lines of code)
    • 43 *.xml files (488 lines of code)
    • 15 *.json files (477 lines of code)
    • 21 *.xaml files (451 lines of code)
    • 9 *.m files (306 lines of code)
    • 9 *.filters files (282 lines of code)
    • 9 *.plist files (268 lines of code)
    • 5 *.storyboard files (252 lines of code)
    • 4 *.mm files (229 lines of code)
    • 3 *.bat files (198 lines of code)
    • 9 *.gradle files (162 lines of code)
    • 17 *.h files (153 lines of code)
    • 10 *.mk files (123 lines of code)
    • 2 *.js files (75 lines of code)
    • 5 *.props files (43 lines of code)
    • 3 *.properties files (41 lines of code)
    • 1 *.md files (25 lines of code)
    • 1 *.html files (17 lines of code)
    • 1 *.css files (8 lines of code)
    • 3 *.cmd files (3 lines of code)
  • " *.cs" is biggest, containing 26.78% of code.
  • " *.cmd" is smallest, containing 0.02% of code.


*.cs3265 LOC (26%) 50 files
*.csproj1937 LOC (15%) 16 files
*.cpp999 LOC (8%) 16 files
*.vcxproj918 LOC (7%) 9 files
*.xib779 LOC (6%) 1 files
*.java693 LOC (5%) 14 files
*.xml488 LOC (4%) 43 files
*.json477 LOC (3%) 15 files
*.xaml451 LOC (3%) 21 files
*.m306 LOC (2%) 9 files
*.filters282 LOC (2%) 9 files
*.plist268 LOC (2%) 9 files
*.storyboard252 LOC (2%) 5 files
*.mm229 LOC (1%) 4 files
*.bat198 LOC (1%) 3 files
*.gradle162 LOC (1%) 9 files
*.h153 LOC (1%) 17 files
*.mk123 LOC (1%) 10 files
*.js75 LOC (<1%) 2 files
*.props43 LOC (<1%) 5 files
*.properties41 LOC (<1%) 3 files
*.md25 LOC (<1%) 1 files
*.html17 LOC (<1%) 1 files
*.css8 LOC (<1%) 1 files
*.cmd3 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 namespace heuristics)
  • *.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
  • *.mm 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
  • *.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)
  • *.vcxproj 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
  • *.filters 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
  • *.props 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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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
  • *.proj 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
  • *.targets 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
  • *.cmd 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
  • *.cc 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
  • *.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
  • *.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


2022-01-30 14:59