apple / foundationdb
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
cmake
in
csproj
S
mod
clang-format
TXT
wxs
wixproj
targets
plist
cfg
  • 38 extensions are included in analyses: cpp, h, txt, toml, java, rst, py, cmake, go, md, sh, c, cs, rb, json, in, inc, svg, bash, csproj, hpp, xml, js, S, mod, html, clang-format, TXT, yml, cc, css, gitignore, yaml, wxs, wixproj, targets, plist, cfg
  • 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 ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (1 file).
    • 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 ".*/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) (143 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.

main408690 LOC (89%) 1107 files
test22264 LOC (4%) 237 files
generated0 LOC (0%) 0 files
build and deployment1741 LOC (<1%) 27 files
other22262 LOC (4%) 179 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
s
in
wixproj
targets
wxs
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1107 files match defined criteria (408,690 lines of code, 100.0% vs. main code):
    • 398 *.cpp files (196,472 lines of code)
    • 383 *.h files (89,872 lines of code)
    • 14 *.c files (81,152 lines of code)
    • 102 *.java files (9,720 lines of code)
    • 55 *.py files (8,942 lines of code)
    • 36 *.go files (5,474 lines of code)
    • 43 *.cmake files (4,752 lines of code)
    • 19 *.cs files (3,831 lines of code)
    • 15 *.rb files (2,302 lines of code)
    • 4 *.hpp files (2,124 lines of code)
    • 2 *.css files (766 lines of code)
    • 2 *.html files (705 lines of code)
    • 4 *.s files (693 lines of code)
    • 7 *.inc files (466 lines of code)
    • 1 *.js files (444 lines of code)
    • 3 *.cc files (419 lines of code)
    • 13 *.in files (352 lines of code)
    • 1 *.wixproj files (81 lines of code)
    • 2 *.bash files (47 lines of code)
    • 1 *.targets files (38 lines of code)
    • 1 *.wxs files (34 lines of code)
    • 1 *.cfg files (4 lines of code)
  • " *.cpp" is biggest, containing 48.07% of code.
  • " *.cfg" is smallest, containing 0% of code.


*.cpp196472 LOC (48%) 398 files
*.h89872 LOC (21%) 383 files
*.c81152 LOC (19%) 14 files
*.java9720 LOC (2%) 102 files
*.py8942 LOC (2%) 55 files
*.go5474 LOC (1%) 36 files
*.cmake4752 LOC (1%) 43 files
*.cs3831 LOC (<1%) 19 files
*.rb2302 LOC (<1%) 15 files
*.hpp2124 LOC (<1%) 4 files
*.css766 LOC (<1%) 2 files
*.html705 LOC (<1%) 2 files
*.s693 LOC (<1%) 4 files
*.inc466 LOC (<1%) 7 files
*.js444 LOC (<1%) 1 files
*.cc419 LOC (<1%) 3 files
*.in352 LOC (<1%) 13 files
*.wixproj81 LOC (<1%) 1 files
*.bash47 LOC (<1%) 2 files
*.targets38 LOC (<1%) 1 files
*.wxs34 LOC (<1%) 1 files
*.cfg4 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
txt
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • 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 ".*_test[.].*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 237 files match defined criteria (22,264 lines of code, 5.4% vs. main code):
    • 31 *.py files (5,738 lines of code)
    • 34 *.java files (4,482 lines of code)
    • 6 *.c files (3,595 lines of code)
    • 137 *.toml files (3,272 lines of code)
    • 10 *.cpp files (3,082 lines of code)
    • 2 *.rb files (598 lines of code)
    • 5 *.go files (475 lines of code)
    • 4 *.h files (395 lines of code)
    • 1 *.yaml files (259 lines of code)
    • 2 *.sh files (193 lines of code)
    • 1 *.hpp files (163 lines of code)
    • 3 *.txt files (11 lines of code)
    • 1 *.cmake files (1 lines of code)
  • " *.py" is biggest, containing 25.77% of code.
  • " *.cmake" is smallest, containing 0% of code.


*.py5738 LOC (25%) 31 files
*.java4482 LOC (20%) 34 files
*.c3595 LOC (16%) 6 files
*.toml3272 LOC (14%) 137 files
*.cpp3082 LOC (13%) 10 files
*.rb598 LOC (2%) 2 files
*.go475 LOC (2%) 5 files
*.h395 LOC (1%) 4 files
*.yaml259 LOC (1%) 1 files
*.sh193 LOC (<1%) 2 files
*.hpp163 LOC (<1%) 1 files
*.txt11 LOC (<1%) 3 files
*.cmake1 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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 ".*[.]csproj".
    • files with paths like ".*/docker[-]compose[.]yml".
  • 27 files match defined criteria (1,741 lines of code, 0.4% vs. main code):
    • 22 *.sh files (1,501 lines of code)
    • 5 *.csproj files (240 lines of code)
  • " *.sh" is biggest, containing 86.21% of code.
  • " *.csproj" is smallest, containing 13.79% of code.


*.sh1501 LOC (86%) 22 files
*.csproj240 LOC (13%) 5 files
Other Code
mod
plist
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 ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 179 files match defined criteria (22,262 lines of code, 5.4% vs. main code):
    • 112 *.rst files (14,494 lines of code)
    • 28 *.md files (2,527 lines of code)
    • 12 *.json files (2,342 lines of code)
    • 4 *.inc files (1,285 lines of code)
    • 5 *.py files (626 lines of code)
    • 1 *.cpp files (502 lines of code)
    • 4 *.xml files (193 lines of code)
    • 3 *.yml files (91 lines of code)
    • 3 *.mod files (55 lines of code)
    • 1 *.go files (47 lines of code)
    • 1 *.svg files (42 lines of code)
    • 4 *.bash files (40 lines of code)
    • 1 *.plist files (18 lines of code)
  • " *.rst" is biggest, containing 65.11% of code.
  • " *.plist" is smallest, containing 0.08% of code.


*.rst14494 LOC (65%) 112 files
*.md2527 LOC (11%) 28 files
*.json2342 LOC (10%) 12 files
*.inc1285 LOC (5%) 4 files
*.py626 LOC (2%) 5 files
*.cpp502 LOC (2%) 1 files
*.xml193 LOC (<1%) 4 files
*.yml91 LOC (<1%) 3 files
*.mod55 LOC (<1%) 3 files
*.go47 LOC (<1%) 1 files
*.svg42 LOC (<1%) 1 files
*.bash40 LOC (<1%) 4 files
*.plist18 LOC (<1%) 1 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
  • *.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
  • *.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)
  • *.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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.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
  • *.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)
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.wixproj 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
  • *.bash files are analyzed with ShellAnalyzer:
    • 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
  • *.wxs 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
  • *.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


2022-01-30 21:47