Static Source Code Analysis via API Configuration Files
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Productivity
If analysis tools provide detailed API call information, then productivity and quality control improve, but the system requires extensive adaptation for each API
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.
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.
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
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.
4Reliability
If quantitative and objective quality measurements are implemented, then software quality assessment improves, but the complexity of implementing such measurements increases
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.
Data Source
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.


