Static Source Code Analysis via API Configuration Files

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current static source code analysis tools lack the ability to provide effective, quantitative, and objective measurements for software quality, particularly for large-scale software projects, and struggle to quickly identify and prioritize quality issues, especially when dealing with application programming interface (API) instructions, which are often treated as 'black-box' components.

Innovation Solution

A method for customized static source code analysis that involves parsing the source code to identify API calls, using configuration files to determine the description and target resources of these calls, and generating reports that provide detailed insights into API usage, allowing end-users to configure analysis behavior without requiring extensive development efforts or adapting the analysis system for each API.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If static source code analysis tools analyze API calls as black-box components, then analysis speed is maintained, but measurement precision and quality assessment are insufficient

Engineering Contradiction:
Improvequality measurement precisionVSAvoidanalysis system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the analysis system into modular components: API call identifiers extract API names from source code, description lookups retrieve functionality information from configuration files, and target resource identifiers determine accessed resources. This segmentation enables precise API analysis without requiring the entire system to be complex, as each component has a specific, simplified function.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces configuration files as an intermediary between the analysis tool and API calls. These files contain pre-defined API descriptions, parameters, and target resource information, allowing the tool to obtain precise quality measurements without hardcoding complex analysis logic into the system itself.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If analysis tools provide detailed API call information, then productivity and quality control improve, but the system requires extensive adaptation for each API

Engineering Contradiction:
Improvesoftware development productivityVSAvoidsystem adaptability to different APIs
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent creates a universal analysis framework that can handle multiple different API calls through a common configuration file structure. The system uses generic identifiers, description lookups, and target resource identification that work across various API types (file operations, database operations, network operations, etc.), eliminating the need to adapt the core system for each specific API.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent enables flexibility by allowing configuration files to define different parameters for different API calls. The system can change its behavior by loading different configuration sets rather than modifying its structure, adapting to various API types through parameter variations in the configuration data.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If the analysis system is updated for each new API call, then analysis accuracy is maintained, but time consumption and resource expenditure increase

Engineering Contradiction:
ImproveAPI analysis accuracyVSAvoidsystem update time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary action by pre-defining API descriptions, parameters, and target resource information in configuration files before the actual analysis takes place. When a new API call needs to be analyzed, the system simply looks up the pre-prepared information in the configuration files rather than performing complex analysis or requiring system updates, significantly reducing time consumption.

Inventive Principle:
Principle #10Preliminary action

4Reliability

If quantitative and objective quality measurements are implemented, then software quality assessment improves, but the complexity of implementing such measurements increases

Engineering Contradiction:
Improvesoftware quality reliabilityVSAvoidmeasurement system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements self-service by having the analysis system automatically extract API call information from source code using identifiers and description lookups against configuration files. The system generates quantitative quality measurements autonomously without requiring manual intervention or complex external tools, achieving reliable quality assessment through automated, rule-based analysis.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20190073216A1Customized static source code analysis
Publication Date: 2019.03.07 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US20190073216A1 patent drawing
  • US20190073216A1 patent drawing
  • US20190073216A1 patent drawing

AI summary

Technical solutions are described for customized static source code analysis. An example method includes parsing a source code, the parsing comprising identifying an application programming interface (API) call. The method further includes identifying an analysis configuration file corresponding to the API call. Further, the method includes determining, based on the analysis configuration file, a description of the API call and an identification of a target resource invoked by the API call. Further, the method includes generating a static source code analysis report that includes the description of the API call and the identification of the target resource corresponding to the API call.