apple / cups
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
in
cxx
m4
po
vcxproj
filters
txt
ps
cgi
gitattributes
plist
  • 23 extensions are included in analyses: c, html, h, in, cxx, m4, po, sh, vcxproj, filters, svg, txt, md, ps, css, cgi, bat, gitattributes, plist, json, yml, gitignore, php
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (3 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (17 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) (7 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.

main318667 LOC (31%) 446 files
test1255 LOC (<1%) 13 files
generated338374 LOC (33%) 6 files
build and deployment4 LOC (<1%) 1 files
other344395 LOC (34%) 23 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
po
cxx
in
vcxproj
filters
cgi
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 446 files match defined criteria (318,667 lines of code, 100.0% vs. main code):
    • 198 *.c files (145,829 lines of code)
    • 12 *.po files (123,232 lines of code)
    • 79 *.html files (25,560 lines of code)
    • 74 *.h files (9,843 lines of code)
    • 27 *.cxx files (8,256 lines of code)
    • 34 *.in files (3,230 lines of code)
    • 9 *.vcxproj files (1,202 lines of code)
    • 2 *.css files (1,010 lines of code)
    • 9 *.filters files (479 lines of code)
    • 1 *.php files (19 lines of code)
    • 1 *.cgi files (7 lines of code)
  • " *.c" is biggest, containing 45.76% of code.
  • " *.cgi" is smallest, containing 0% of code.


*.c145829 LOC (45%) 198 files
*.po123232 LOC (38%) 12 files
*.html25560 LOC (8%) 79 files
*.h9843 LOC (3%) 74 files
*.cxx8256 LOC (2%) 27 files
*.in3230 LOC (1%) 34 files
*.vcxproj1202 LOC (<1%) 9 files
*.css1010 LOC (<1%) 2 files
*.filters479 LOC (<1%) 9 files
*.php19 LOC (<1%) 1 files
*.cgi7 LOC (<1%) 1 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 ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 13 files match defined criteria (1,255 lines of code, 0.4% vs. main code):
    • 11 *.sh files (1,227 lines of code)
    • 2 *.html files (28 lines of code)
  • " *.sh" is biggest, containing 97.77% of code.
  • " *.html" is smallest, containing 2.23% of code.


*.sh1227 LOC (97%) 11 files
*.html28 LOC (2%) 2 files
Generated Code
Automatically generated files, not manually changed after generation.
ps
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](ps|eps|pfa)".
  • 6 files match defined criteria (338,374 lines of code, 106.2% vs. main code). All matches are in *.ps files.


*.ps338374 LOC (100%) 6 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
  • 1 file matches defined criteria (4 lines of code, 0.0% vs. main code). All matches are in *.bat files.


*.bat4 LOC (100%) 1 files
Other Code
ps
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 ".*[.]md".
    • files with paths like ".*/INSTALL[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Mm]an/.*".
    • files with paths like ".*[.]plist".
  • 23 files match defined criteria (344,395 lines of code, 108.1% vs. main code):
    • 5 *.ps files (338,350 lines of code)
    • 6 *.svg files (2,919 lines of code)
    • 7 *.md files (2,035 lines of code)
    • 3 *.c files (1,025 lines of code)
    • 1 *.plist files (50 lines of code)
    • 1 *.h files (16 lines of code)
  • " *.ps" is biggest, containing 98.24% of code.
  • " *.h" is smallest, containing 0% of code.


*.ps338350 LOC (98%) 5 files
*.svg2919 LOC (<1%) 6 files
*.md2035 LOC (<1%) 7 files
*.c1025 LOC (<1%) 3 files
*.plist50 LOC (<1%) 1 files
*.h16 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.po 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
  • *.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
  • *.cxx 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
  • *.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
  • *.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
  • *.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
  • *.php 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
  • *.cgi 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 21:05