An approach for classifying source code with a code quality indicator
AssigneeCodescene AB
InventorAdam TORNHILL
Life of this patent
Estimating the term…
Loading patent…
AssigneeCodescene AB
InventorAdam TORNHILL
Estimating the term…
A computer-implemented method for code classification includes parsing source code stored on a code carrier to obtain a plurality of code structure characteristics of the source code, and evaluating the code structure characteristics on at least three code structure levels. In some embodiments, the at least three code structure levels include one or more of: a global level, a module level, an intermodule level, a function level, an inter-function level, and an implementation level. The evaluation on each code structure level includes, for each of one or more level-specific conditions, determining whether the code structure characteristics violate the level-specific condition, and representing the violation by a weighted value. The method also includes combining the weighted values for at least some of the violated level-specific conditions over the at least three code structure levels to generate one or more code quality indicator for the source code.
1-10. (canceled)
A computer-implemented method for code classification, the method comprising:
The method of claim 1, wherein the at least three code structure levels further comprise one or more of:
The method of claim 1, wherein at least some of the level-specific conditions includes a requirement for one or more of:
The method of claim 1, wherein combining weighted values comprises accumulating the weighted values and mapping the result of accumulation to a code quality indicator value.
The method of claim 1, wherein the one or more code quality indicator for the source code further comprises an overall code quality value of the source code.
The method of claim 1, further comprising implementing, on the code carrier, an association between the one or more code quality indicator and the source code.
A computer program product comprising a non-transitory computer readable medium, having thereon a computer program comprising program instructions, the computer program being loadable into a data processing unit and configured to cause execution of the method according to claim 1 when the computer program is run by the data processing unit.
An apparatus for code classification, the apparatus comprising controlling circuitry configured to cause:
Dependencies are inferred from the claim text.