tensorflow / datasets
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
jsonl
mat
TXT
pt
nl
ru
fr
nb
proto
  • 23 extensions are included in analyses: json, py, txt, md, jsonl, mat, xml, TXT, cs, pt, es, nl, ru, fr, ipynb, yaml, nb, proto, sh, yml, pl, gitignore, toml
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (198 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) (1003 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.

main52582 LOC (12%) 680 files
test19504 LOC (4%) 538 files
generated0 LOC (0%) 0 files
build and deployment71 LOC (<1%) 3 files
other351705 LOC (82%) 2497 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
jsonl
ru
pt
nl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 680 files match defined criteria (52,582 lines of code, 100.0% vs. main code):
    • 614 *.py files (51,924 lines of code)
    • 3 *.proto files (543 lines of code)
    • 47 *.jsonl files (86 lines of code)
    • 3 *.cs files (5 lines of code)
    • 3 *.ru files (5 lines of code)
    • 3 *.pt files (5 lines of code)
    • 3 *.es files (5 lines of code)
    • 3 *.nl files (5 lines of code)
    • 1 *.toml files (4 lines of code)
  • " *.py" is biggest, containing 98.75% of code.
  • " *.toml" is smallest, containing 0.01% of code.


*.py51924 LOC (98%) 614 files
*.proto543 LOC (1%) 3 files
*.jsonl86 LOC (<1%) 47 files
*.cs5 LOC (<1%) 3 files
*.ru5 LOC (<1%) 3 files
*.pt5 LOC (<1%) 3 files
*.es5 LOC (<1%) 3 files
*.nl5 LOC (<1%) 3 files
*.toml4 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mat
txt
jsonl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 538 files match defined criteria (19,504 lines of code, 37.1% vs. main code):
    • 391 *.py files (17,001 lines of code)
    • 34 *.mat files (1,878 lines of code)
    • 35 *.txt files (455 lines of code)
    • 66 *.jsonl files (128 lines of code)
    • 10 *.cs files (30 lines of code)
    • 2 *.pl files (12 lines of code)
  • " *.py" is biggest, containing 87.17% of code.
  • " *.pl" is smallest, containing 0.06% of code.


*.py17001 LOC (87%) 391 files
*.mat1878 LOC (9%) 34 files
*.txt455 LOC (2%) 35 files
*.jsonl128 LOC (<1%) 66 files
*.cs30 LOC (<1%) 10 files
*.pl12 LOC (<1%) 2 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 ".*[.]sh".
  • 3 files match defined criteria (71 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh71 LOC (100%) 3 files
Other Code
nb
fr
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 ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]nb".
    • files with paths like ".*[.]fr".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 2497 files match defined criteria (351,705 lines of code, 668.9% vs. main code):
    • 2,439 *.json files (349,391 lines of code)
    • 15 *.py files (1,477 lines of code)
    • 25 *.xml files (604 lines of code)
    • 12 *.md files (219 lines of code)
    • 3 *.nb files (9 lines of code)
    • 3 *.fr files (5 lines of code)
  • " *.json" is biggest, containing 99.34% of code.
  • " *.fr" is smallest, containing 0% of code.


*.json349391 LOC (99%) 2439 files
*.py1477 LOC (<1%) 15 files
*.xml604 LOC (<1%) 25 files
*.md219 LOC (<1%) 12 files
*.nb9 LOC (<1%) 3 files
*.fr5 LOC (<1%) 3 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.jsonl files are analyzed with JsonAnalyzer:
    • 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
  • *.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)
  • *.ru 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
  • *.pt 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
  • *.es 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
  • *.nl 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
  • *.toml 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 08:07