whatsapp / otp
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
asn1
pub
asn
mk
txt
spec
in
s
xsd
tab
yrl
m4
el
sed
xsl
cfg
zone
boot
prefs
patch
com
project
tool
cocci
classpath
nsi
x
clang-format
gitattributes
  • 55 extensions are included in analyses: erl, xml, c, h, gitignore, hrl, asn1, pub, asn, mk, txt, cpp, java, spec, html, sh, in, md, s, xsd, tab, py, inc, yrl, m4, d, el, escript, bat, sed, xsl, cfg, css, js, svg, pl, zone, yaml, boot, prefs, patch, com, project, tool, cocci, yml, classpath, exs, nsi, cc, hpp, x, clang-format, gitattributes, json
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (344 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (14 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (16 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (1 file).
    • exclude files with path like ".*/dependencies/.*" (Dependencies) (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.

main1467724 LOC (55%) 3236 files
test948883 LOC (36%) 3332 files
generated88975 LOC (3%) 227 files
build and deployment6785 LOC (<1%) 157 files
other117049 LOC (4%) 358 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
el
yrl
asn1
xsl
asn
nsi
x
cocci
sed
tool
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3236 files match defined criteria (1,467,724 lines of code, 100.0% vs. main code):
    • 1,230 *.erl files (688,253 lines of code)
    • 709 *.xml files (280,793 lines of code)
    • 431 *.c files (275,639 lines of code)
    • 393 *.h files (77,051 lines of code)
    • 71 *.cpp files (38,664 lines of code)
    • 187 *.hrl files (37,570 lines of code)
    • 37 *.in files (17,586 lines of code)
    • 11 *.el files (11,270 lines of code)
    • 13 *.yrl files (8,322 lines of code)
    • 56 *.java files (6,583 lines of code)
    • 21 *.asn1 files (5,378 lines of code)
    • 10 *.html files (3,571 lines of code)
    • 7 *.xsl files (3,552 lines of code)
    • 18 *.inc files (3,331 lines of code)
    • 2 *.d files (2,941 lines of code)
    • 12 *.asn files (2,670 lines of code)
    • 3 *.escript files (1,044 lines of code)
    • 1 *.hpp files (978 lines of code)
    • 6 *.css files (682 lines of code)
    • 3 *.js files (424 lines of code)
    • 1 *.nsi files (416 lines of code)
    • 4 *.py files (330 lines of code)
    • 1 *.x files (225 lines of code)
    • 1 *.cocci files (160 lines of code)
    • 1 *.exs files (98 lines of code)
    • 1 *.cc files (90 lines of code)
    • 1 *.pl files (63 lines of code)
    • 3 *.sed files (32 lines of code)
    • 2 *.tool files (8 lines of code)
  • " *.erl" is biggest, containing 46.89% of code.
  • " *.tool" is smallest, containing 0% of code.


*.erl688253 LOC (46%) 1230 files
*.xml280793 LOC (19%) 709 files
*.c275639 LOC (18%) 431 files
*.h77051 LOC (5%) 393 files
*.cpp38664 LOC (2%) 71 files
*.hrl37570 LOC (2%) 187 files
*.in17586 LOC (1%) 37 files
*.el11270 LOC (<1%) 11 files
*.yrl8322 LOC (<1%) 13 files
*.java6583 LOC (<1%) 56 files
*.asn15378 LOC (<1%) 21 files
*.html3571 LOC (<1%) 10 files
*.xsl3552 LOC (<1%) 7 files
*.inc3331 LOC (<1%) 18 files
*.d2941 LOC (<1%) 2 files
*.asn2670 LOC (<1%) 12 files
*.escript1044 LOC (<1%) 3 files
*.hpp978 LOC (<1%) 1 files
*.css682 LOC (<1%) 6 files
*.js424 LOC (<1%) 3 files
*.nsi416 LOC (<1%) 1 files
*.py330 LOC (<1%) 4 files
*.x225 LOC (<1%) 1 files
*.cocci160 LOC (<1%) 1 files
*.exs98 LOC (<1%) 1 files
*.cc90 LOC (<1%) 1 files
*.pl63 LOC (<1%) 1 files
*.sed32 LOC (<1%) 3 files
*.tool8 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
asn
asn1
xsd
yrl
in
pub
xsl
spec
mk
cfg
zone
sed
com
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 3332 files match defined criteria (948,883 lines of code, 64.6% vs. main code):
    • 2,281 *.erl files (794,925 lines of code)
    • 138 *.asn files (48,547 lines of code)
    • 219 *.asn1 files (40,790 lines of code)
    • 135 *.c files (25,459 lines of code)
    • 37 *.xsd files (14,487 lines of code)
    • 29 *.py files (4,844 lines of code)
    • 77 *.hrl files (4,429 lines of code)
    • 49 *.xml files (4,367 lines of code)
    • 20 *.h files (4,096 lines of code)
    • 39 *.html files (1,960 lines of code)
    • 15 *.java files (1,475 lines of code)
    • 3 *.yrl files (975 lines of code)
    • 9 *.sh files (469 lines of code)
    • 2 *.in files (440 lines of code)
    • 177 *.pub files (421 lines of code)
    • 1 *.xsl files (384 lines of code)
    • 68 *.spec files (287 lines of code)
    • 11 *.mk files (285 lines of code)
    • 7 *.cfg files (79 lines of code)
    • 3 *.zone files (79 lines of code)
    • 2 *.pl files (32 lines of code)
    • 6 *.bat files (28 lines of code)
    • 3 *.sed files (24 lines of code)
    • 1 *.com files (1 lines of code)
  • " *.erl" is biggest, containing 83.77% of code.
  • " *.com" is smallest, containing 0% of code.


*.erl794925 LOC (83%) 2281 files
*.asn48547 LOC (5%) 138 files
*.asn140790 LOC (4%) 219 files
*.c25459 LOC (2%) 135 files
*.xsd14487 LOC (1%) 37 files
*.py4844 LOC (<1%) 29 files
*.hrl4429 LOC (<1%) 77 files
*.xml4367 LOC (<1%) 49 files
*.h4096 LOC (<1%) 20 files
*.html1960 LOC (<1%) 39 files
*.java1475 LOC (<1%) 15 files
*.yrl975 LOC (<1%) 3 files
*.sh469 LOC (<1%) 9 files
*.in440 LOC (<1%) 2 files
*.pub421 LOC (<1%) 177 files
*.xsl384 LOC (<1%) 1 files
*.spec287 LOC (<1%) 68 files
*.mk285 LOC (<1%) 11 files
*.cfg79 LOC (<1%) 7 files
*.zone79 LOC (<1%) 3 files
*.pl32 LOC (<1%) 2 files
*.bat28 LOC (<1%) 6 files
*.sed24 LOC (<1%) 3 files
*.com1 LOC (<1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
    • files with paths like ".*/src/gen/.*".
  • 227 files match defined criteria (88,975 lines of code, 6.1% vs. main code):
    • 223 *.erl files (82,041 lines of code)
    • 2 *.hrl files (6,802 lines of code)
    • 2 *.html files (132 lines of code)
  • " *.erl" is biggest, containing 92.21% of code.
  • " *.html" is smallest, containing 0.15% of code.


*.erl82041 LOC (92%) 223 files
*.hrl6802 LOC (7%) 2 files
*.html132 LOC (<1%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
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 ".*[.]mk".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitattributes".
  • 157 files match defined criteria (6,785 lines of code, 0.5% vs. main code):
    • 111 *.mk files (3,482 lines of code)
    • 45 *.sh files (3,248 lines of code)
    • 1 *.bat files (55 lines of code)
  • " *.mk" is biggest, containing 51.32% of code.
  • " *.bat" is smallest, containing 0.81% of code.


*.mk3482 LOC (51%) 111 files
*.sh3248 LOC (47%) 45 files
*.bat55 LOC (<1%) 1 files
Other Code
txt
tab
patch
asn
in
mk
sed
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Mm]an/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]tab".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
  • 358 files match defined criteria (117,049 lines of code, 8.0% vs. main code):
    • 85 *.txt files (68,112 lines of code)
    • 105 *.erl files (23,328 lines of code)
    • 35 *.tab files (10,990 lines of code)
    • 39 *.md files (8,393 lines of code)
    • 36 *.c files (3,519 lines of code)
    • 7 *.xml files (899 lines of code)
    • 11 *.d files (413 lines of code)
    • 2 *.svg files (272 lines of code)
    • 5 *.hrl files (239 lines of code)
    • 2 *.patch files (193 lines of code)
    • 15 *.html files (171 lines of code)
    • 3 *.asn files (163 lines of code)
    • 1 *.in files (118 lines of code)
    • 5 *.mk files (110 lines of code)
    • 1 *.json files (72 lines of code)
    • 1 *.py files (21 lines of code)
    • 2 *.sh files (15 lines of code)
    • 1 *.sed files (11 lines of code)
    • 1 *.bat files (7 lines of code)
    • 1 *.h files (3 lines of code)
  • " *.txt" is biggest, containing 58.19% of code.
  • " *.h" is smallest, containing 0% of code.


*.txt68112 LOC (58%) 85 files
*.erl23328 LOC (19%) 105 files
*.tab10990 LOC (9%) 35 files
*.md8393 LOC (7%) 39 files
*.c3519 LOC (3%) 36 files
*.xml899 LOC (<1%) 7 files
*.d413 LOC (<1%) 11 files
*.svg272 LOC (<1%) 2 files
*.hrl239 LOC (<1%) 5 files
*.patch193 LOC (<1%) 2 files
*.html171 LOC (<1%) 15 files
*.asn163 LOC (<1%) 3 files
*.in118 LOC (<1%) 1 files
*.mk110 LOC (<1%) 5 files
*.json72 LOC (<1%) 1 files
*.py21 LOC (<1%) 1 files
*.sh15 LOC (<1%) 2 files
*.sed11 LOC (<1%) 1 files
*.bat7 LOC (<1%) 1 files
*.h3 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.erl 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
  • *.xml 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
  • *.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
  • *.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
  • *.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
  • *.hrl 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
  • *.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
  • *.el 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
  • *.yrl 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)
  • *.asn1 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
  • *.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
  • *.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
  • *.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
  • *.d files are analyzed with DAnalyzer:
    • 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
  • *.asn 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
  • *.escript 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
  • *.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
  • *.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
  • *.nsi 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
  • *.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
  • *.x 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
  • *.cocci 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
  • *.exs 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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.sed 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
  • *.tool 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


2022-04-16 06:54