Static Analysis Artifact Capture via Build Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static analysis systems face challenges in accurately capturing source code and associated artifacts without requiring a build environment, leading to incomplete module dependencies and increased onboarding time, especially for users without access to build systems or compilers.

Innovation Solution

The system automatically captures source code and artifacts by determining the current project state, inferring build commands, and using both build-capture and buildless-capture methods based on module types and definition files, allowing for tree-based graph representations without the need for a build environment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If build-capture method is used to translate source code into tree-based graph representations, then manufacturing precision of static analysis is improved, but device complexity increases due to requiring build environment, compilers, and build systems

Engineering Contradiction:
Improvefidelity of static analysisVSAvoidcomplexity of build environment
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The system segments the capture process into two distinct methods: build-capture for compiled languages (C, C++, C#, Java) that require build environments, and buildless-capture for interpreted languages (JavaScript, Python, Go) that do not. This segmentation allows the system to apply the appropriate method based on module type, reducing unnecessary complexity while maintaining fidelity where needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system changes the parameter of capture method selection based on module type identification. By detecting whether a module is compiled or interpreted language type, the system dynamically adjusts the capture approach, using build-capture only when necessary for compiled languages and buildless-capture for interpreted languages, thereby reducing overall system complexity.

Inventive Principle:
Principle #35Parameter changes

2Manufacturing precision

If build-capture method is used for all modules, then manufacturing precision of static analysis is improved, but loss of time increases due to requiring build environment setup and compilation process

Engineering Contradiction:
Improvefidelity of static analysisVSAvoidonboarding time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system segments modules by language type and applies different capture methods accordingly. Interpreted language modules use buildless-capture for immediate translation without compilation, while compiled language modules use build-capture. This segmentation eliminates unnecessary compilation steps for interpreted languages, significantly reducing onboarding time.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system applies build-capture only partially - specifically to compiled language modules that require it - rather than universally to all modules. This partial application of the build process reduces overall onboarding time while maintaining fidelity where actually needed.

Inventive Principle:
Principle #16Partial or excessive action

3Ease of operation

If buildless-capture method is used for interpreted languages, then ease of operation is improved by eliminating build environment requirements, but manufacturing precision may be compromised without proper module dependency tracking

Engineering Contradiction:
Improveaccessibility of static analysisVSAvoidaccuracy of static analysis
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

The system performs preliminary action by identifying and tracking module dependencies before executing buildless-capture. By pre-establishing the dependency graph and determining capture sequences, the system ensures that all required modules are captured in the correct order, maintaining accuracy without requiring build environments.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses feedback mechanisms to track capture status of individual files and modules. By monitoring which modules have been captured and their dependencies, the system can adjust the capture process dynamically, ensuring completeness and accuracy even when using the simplified buildless-capture method.

Inventive Principle:
Principle #23Feedback

4Ease of operation

If automatic capture process is implemented without build environment, then ease of operation is improved, but loss of information increases due to incomplete module dependencies

Engineering Contradiction:
Improveaccessibility to non-technical usersVSAvoidcompleteness of module dependencies
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The system performs preliminary dependency analysis by scanning module definition files (such as package.json for JavaScript or requirements.txt for Python) to automatically identify and track module dependencies before capture. This preliminary action ensures complete dependency information is gathered without requiring users to manually configure build environments.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements self-service by automatically detecting module types, inferring build commands when needed, and tracking dependencies without user intervention. The capture process autonomously determines the appropriate method (build-capture or buildless-capture) and executes accordingly, eliminating the need for users to understand or configure complex build systems.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11829751B1System and method for automatically capturing source code and associated artifacts for static analysis
Publication Date: 2023.11.28 BLACK DUCK SOFTWARE INC
  • US11829751B1 patent drawing
  • US11829751B1 patent drawing
  • US11829751B1 patent drawing

AI summary

This disclosure describes a system and method of automatically capturing source code and associated artifacts for static analysis. A method includes receiving a current state of a project that includes a set of files in a directory to be captured for analysis and a current capture status of individual files of the set of files, determining a plan including a sequence of actions in response to the current state of the project, and executing the sequence of actions to capture each of the set of files. The sequence of actions includes capturing buildable modules in the set of files with a build-capture based on a default build command and a buildless-capture based on module definition files.