Software code complexity detection method and device and electronic equipment
A software code and detection method technology, applied in the computer field, can solve the problem of not forming a perfect overall software detection and evaluation mechanism, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0050] Based on the above-mentioned software code complexity detection scheme idea, such as figure 2 As shown, it is a schematic flow chart of a method for detecting software code complexity in Embodiment 1 of the present invention. The execution subject of the method is a detection device for software code complexity. The method includes:
[0051] S210. Acquire code complexity indicators of multiple code fragments of the software to be evaluated.
[0052] Wherein, as explained above, the code complexity index can be obtained by collecting the original measurement data of the code fragment and mapping the original measurement data according to the preset threshold interval.
[0053] In practical application scenarios, the original measurement data of code complexity indicators in multiple dimensions can be collected by calling the indicator calculator, and different threshold intervals can be preset for different types of code complexity indicators{t 1 ,t 2 ...t n}, accord...
Embodiment 2
[0060] Based on the method for detecting software code complexity described in the previous embodiment, this embodiment will further refine the method. image 3 It is a schematic flow diagram of the detection method of the software code complexity in the second embodiment of the present invention, as image 3 As shown, the method includes:
[0061] S310. Obtain code complexity indicators of multiple code fragments of the software to be evaluated. The content of this step S310 is the same as that of the above-mentioned step S210.
[0062] S320, longitudinally aggregate the code complexity indicators of the multiple code fragments according to the hierarchical order of any multiple layers in the class layer, file layer, module layer, and project layer, to obtain a first aggregation score.
[0063] Further, the step-by-step vertical aggregation of the code complexity indicators of multiple code fragments includes: using the weak term intensive aggregation function to perform le...
Embodiment 3
[0079] Figure 4 It is a schematic structural diagram of a software code complexity detection device according to an embodiment of the present invention, and the device is mainly used to execute figure 2 The method steps shown, as Figure 4 As shown, the device includes:
[0080] A code complexity index acquisition module 410, configured to acquire a code complexity index of a code segment of the software to be evaluated;
[0081] A vertical aggregation module 420, configured to vertically aggregate code complexity indicators of multiple code fragments step by step to obtain a first aggregation score;
[0082] The horizontal aggregation module 430 is configured to horizontally aggregate the first aggregation score to obtain a second aggregation score, and output the second aggregation score as code complexity.
[0083] Further, the above code complexity indicators include:
[0084] Method type indicators of multiple dimensions and / or type type indicators of multiple dimen...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com