Research Article

A Buffer Overflow Prediction Approach Based on Software Metrics and Machine Learning

Table 3

Metrics.

ā€‰NameDescription

1CountInputNumber of calls. Calls by the same method are counted only once, and calls by fields are not counted.
2CountLineThe number of lines of code.
3CountLineCodeThe number of lines containing the code.
4CountLineCodeDeclThe number of lines of the name class, the method name line is also recorded in this number.
5CountLineCodeExeThe number of lines of pure executing class code.
6CountLineCommentAnnotation class code line number.
7CountOutputThe number of calls to other methods, multiple calls to the same method are counted as one call. Return statement counts a call.
8CountPathCode paths that can be executed are related to cyclomatic complexity.
9CountPathLog truncated to an integer value, of the metric CountPath.
10CountSemicolonThe number of semicolons.
11CountStmtThe number of statements, even if multiple sentences are written on one line, is counted multiple times.
12CountStmtDeclDefines the number of class statements, including the method declaration line.
13CountStmtExeThe number of class statements executed.
14CyclomaticCircle complexity (standard calculation method).
15CyclomaticModifiedCircle complexity (the second calculation method).
16CyclomaticStrictCircle complexity (the third calculation method).
17EssentialBasic complexity (standard calculation method).
18KnotsMeasure overlapping jumps.
19MaxEssentialKnotsThe maximum node after the structured programming structure has been deleted.
20MaxNestingMaximum nesting level, relating to cyclomatic complexity.
21MinEssentialKnotsThe minimum node after the structured programming structure has been deleted.
22RatioCommentToCodeCode comment rate.