apache / incubator-teaclave-sgx-sdk
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
lds
in
s
proto
properties
m4
mk
cmd
wast
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.

main125128 LOC (77%) 1,113 files
test4341 LOC (2%) 24 files
generated14208 LOC (8%) 4 files
build and deployment6874 LOC (4%) 16 files
other11688 LOC (7%) 159 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
wast
lds
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1113 files match defined criteria (125,128 LOC, 100.0% vs. main code):
    • 446 *.rs files (81,495 LOC)
    • 163 *.c files (18,650 LOC)
    • 183 *.h files (9,569 LOC)
    • 161 *.toml files (6,361 LOC)
    • 43 *.cpp files (5,143 LOC)
    • 9 *.in files (1,398 LOC)
    • 12 *.java files (721 LOC)
    • 43 *.xml files (474 LOC)
    • 1 *.wast files (391 LOC)
    • 5 *.go files (375 LOC)
    • 41 *.lds files (369 LOC)
    • 4 *.proto files (169 LOC)
    • 1 *.awk files (11 LOC)
    • 1 *.bash files (2 LOC)
  • " *.rs" is biggest, containing 65.13% of LOC.
  • " *.bash" is smallest, containing 0% of LOC.


*.rs81495 LOC (65%) 446 files
*.c18650 LOC (14%) 163 files
*.h9569 LOC (7%) 183 files
*.toml6361 LOC (5%) 161 files
*.cpp5143 LOC (4%) 43 files
*.in1398 LOC (1%) 9 files
*.java721 LOC (<1%) 12 files
*.xml474 LOC (<1%) 43 files
*.wast391 LOC (<1%) 1 file
*.go375 LOC (<1%) 5 files
*.lds369 LOC (<1%) 41 files
*.proto169 LOC (<1%) 4 files
*.awk11 LOC (<1%) 1 file
*.bash2 LOC (<1%) 1 file
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]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
  • 24 files match defined criteria (4,341 LOC, 3.5% vs. main code):
    • 23 *.rs files (4,329 LOC)
    • 1 *.java files (12 LOC)
  • " *.rs" is biggest, containing 99.72% of LOC.
  • " *.java" is smallest, containing 0.28% of LOC.


*.rs4329 LOC (99%) 23 files
*.java12 LOC (<1%) 1 file
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with any line of content like "//[ ]*Generated by .*".
    • 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[!].*".
  • 4 files match defined criteria (14,208 LOC, 11.4% vs. main code):
    • 2 *.cc files (9,482 LOC)
    • 2 *.h files (4,726 LOC)
  • " *.cc" is biggest, containing 66.74% of LOC.
  • " *.h" is smallest, containing 33.26% of LOC.


*.cc9482 LOC (66%) 2 files
*.h4726 LOC (33%) 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 ".*[.]sh".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/pom[.]xml".
  • 16 files match defined criteria (6,874 LOC, 5.5% vs. main code):
    • 12 *.sh files (6,430 LOC)
    • 2 *.mk files (316 LOC)
    • 2 *.xml files (128 LOC)
  • " *.sh" is biggest, containing 93.54% of LOC.
  • " *.xml" is smallest, containing 1.86% of LOC.


*.sh6430 LOC (93%) 12 files
*.mk316 LOC (4%) 2 files
*.xml128 LOC (1%) 2 files
Other Code
txt
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 ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ee]xamples/.*".
  • 159 files match defined criteria (11,688 LOC, 9.3% vs. main code):
    • 45 *.txt files (6,987 LOC)
    • 66 *.md files (2,560 LOC)
    • 44 *.json files (1,973 LOC)
    • 2 *.rs files (166 LOC)
    • 2 *.properties files (2 LOC)
  • " *.txt" is biggest, containing 59.78% of LOC.
  • " *.properties" is smallest, containing 0.02% of LOC.


*.txt6987 LOC (59%) 45 files
*.md2560 LOC (21%) 66 files
*.json1973 LOC (16%) 44 files
*.rs166 LOC (1%) 2 files
*.properties2 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2023-08-10 18:19