android / games-samples
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
proto
inl
meta
txt
gd
properties
cmake
in
anim
vcxproj
tex
S
filters
xproj
m4
plist
pb
mk
pro
storyboard
fsh
vsh
patch
vim
natvis
el
nuspec
podspec
cfg
ini
asset
  • 62 extensions are included in analyses: html, hpp, h, cpp, proto, cc, inl, java, meta, cs, js, py, c, txt, m, xml, md, sh, gradle, gd, json, properties, cmake, bat, rb, in, anim, vcxproj, tex, S, filters, rst, css, xproj, gitignore, m4, plist, yml, go, pb, mk, pro, xib, storyboard, fsh, vsh, svg, php, patch, bzl, vim, natvis, swift, mm, el, gemspec, unity, nuspec, podspec, cfg, ini, asset
  • 13 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (8 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (3293 files).
    • exclude files with path like ".*/proguard[-]rules[.]pro" (ProGuard) (3 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (7 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (0 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (0 files).
    • exclude files with path like ".*/deps/.*" (Dependencies) (0 files).
    • exclude files with path like ".*/testdata/.*" (Test data) (11 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) (11 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.

main62650 LOC (85%) 324 files
test751 LOC (1%) 10 files
generated7855 LOC (10%) 145 files
build and deployment947 LOC (1%) 27 files
other1479 LOC (2%) 54 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
inl
vcxproj
gd
filters
anim
asset
proto
cmake
cfg
s
vsh
fsh
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 324 files match defined criteria (62,650 lines of code, 100.0% vs. main code):
    • 1 *.unity files (27,590 lines of code)
    • 96 *.cpp files (13,039 lines of code)
    • 15 *.inl files (5,613 lines of code)
    • 7 *.vcxproj files (3,376 lines of code)
    • 78 *.hpp files (2,992 lines of code)
    • 30 *.h files (1,921 lines of code)
    • 25 *.cs files (1,736 lines of code)
    • 18 *.gd files (1,473 lines of code)
    • 16 *.java files (1,370 lines of code)
    • 7 *.filters files (813 lines of code)
    • 9 *.anim files (690 lines of code)
    • 1 *.asset files (687 lines of code)
    • 3 *.c files (366 lines of code)
    • 4 *.proto files (208 lines of code)
    • 1 *.cmake files (201 lines of code)
    • 1 *.cfg files (198 lines of code)
    • 8 *.s files (177 lines of code)
    • 2 *.vsh files (114 lines of code)
    • 2 *.fsh files (86 lines of code)
  • " *.unity" is biggest, containing 44.04% of code.
  • " *.fsh" is smallest, containing 0.14% of code.


*.unity27590 LOC (44%) 1 files
*.cpp13039 LOC (20%) 96 files
*.inl5613 LOC (8%) 15 files
*.vcxproj3376 LOC (5%) 7 files
*.hpp2992 LOC (4%) 78 files
*.h1921 LOC (3%) 30 files
*.cs1736 LOC (2%) 25 files
*.gd1473 LOC (2%) 18 files
*.java1370 LOC (2%) 16 files
*.filters813 LOC (1%) 7 files
*.anim690 LOC (1%) 9 files
*.asset687 LOC (1%) 1 files
*.c366 LOC (<1%) 3 files
*.proto208 LOC (<1%) 4 files
*.cmake201 LOC (<1%) 1 files
*.cfg198 LOC (<1%) 1 files
*.s177 LOC (<1%) 8 files
*.vsh114 LOC (<1%) 2 files
*.fsh86 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
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 ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[.][Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 10 files match defined criteria (751 lines of code, 1.2% vs. main code). All matches are in *.java files.


*.java751 LOC (100%) 10 files
Generated Code
Automatically generated files, not manually changed after generation.
meta
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]meta" AND any line of content like ".*fileFormatVersion[:] .*".
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
    • files with paths like ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 145 files match defined criteria (7,855 lines of code, 12.5% vs. main code). All matches are in *.meta files.


*.meta7855 LOC (100%) 145 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 ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]podspec".
    • files with paths like ".*[.]mk".
  • 27 files match defined criteria (947 lines of code, 1.5% vs. main code):
    • 7 *.bat files (487 lines of code)
    • 20 *.gradle files (460 lines of code)
  • " *.bat" is biggest, containing 51.43% of code.
  • " *.gradle" is smallest, containing 48.57% of code.


*.bat487 LOC (51%) 7 files
*.gradle460 LOC (48%) 20 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]vim".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]xib".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 54 files match defined criteria (1,479 lines of code, 2.4% vs. main code):
    • 38 *.xml files (919 lines of code)
    • 10 *.md files (465 lines of code)
    • 6 *.properties files (95 lines of code)
  • " *.xml" is biggest, containing 62.14% of code.
  • " *.properties" is smallest, containing 6.42% of code.


*.xml919 LOC (62%) 38 files
*.md465 LOC (31%) 10 files
*.properties95 LOC (6%) 6 files
Analyzers
Info about analyzers used for source code examinations.
  • *.unity 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
  • *.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
  • *.inl 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
  • *.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
  • *.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
  • *.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)
  • *.gd 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
  • *.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)
  • *.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
  • *.anim 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
  • *.asset 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
  • *.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
  • *.proto 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
  • *.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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.s 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
  • *.vsh 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
  • *.fsh 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-03 05:26