-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetrics.txt
52 lines (38 loc) · 2.38 KB
/
metrics.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Method level metrics:
GENERIC METRICS
- Total number of lines of code -> tloc = CSminerGenericMetrics(data).tloc()
- Number of code lines without blank lines-> sloc_wbl -> CSminerGenericMetrics(data).sloc_wbl()
- Number of code lines without blank lines and without comments or libraries-> 'nloc_whbl', np.abs(np.abs(nloc - CSminerGenericMetrics(data).sloc_statements_wc()) - nloc))
- Number of statements with comments or libraries -> sloc_statements = CSminerGenericMetrics(data).sloc_statements_wc()
- Number of loops -> numLoops -> CSminerGenericMetrics(data).numLoops()
LIZARD Metrics
cyclomatic_complexity, nloc, token_count, start_line, end_line, full_parameters = CSminer_openFile(input_file).CSminerLizar()
- cyclomatic_complexity -> i.function_list[0].__dict__['cyclomatic_complexity']
- nloc -> i.function_list[0].__dict__['nloc']
- token_count -> i.function_list[0].__dict__['token_count']
- start_line -> i.function_list[0].__dict__['start_line']
- end_line -> i.function_list[0].__dict__['end_line']
- full_parameters -> i.function_list[0].__dict__['full_parameters']
METRIC FOR PROGRAMIG LANGUAGE
- Number of of Arguments -> numArf -> NA python
-> numArg -> CSminerJAVA(data).numArg_argDT()
-> numArg -> CSminerCplus(data).numArg_argDT()
- Arguments data type -> NA para PY
-> CSminerJAVA(data).numArg_argDT()
-> CSminerCplus(data).numArg_argDT()
- Number of operator-> CSminerPY(data).numVar_numOper()
-> CSminerGenericMetrics(data).numVar_numOper() - this one is used also for c++, works fine :D
-> CSminerGenericMetrics(data).numVar_numOper() - Java
- Total number of variables declared -> CSminerPY(data).numVar_numExpressions()
-> CSminerGenericMetrics(data).numVar_numOper() - this one is used also for c++, works fine :D
-> CSminerGenericMetrics(data).numVar_numOper() - Java
- Number of external methods called -> CSminerGenericMetrics(data).numMethodCall()
- Return info, return somenthing (True/False) -> CSminer(data).retunrInfo()
- Return info, how many return values -> CSminer(data).retunrInfo()
- Return info, return data type -> CSminer(data).retunrInfo()
- extension file
python main.py -i C:\Users\duquet\Documents\GitHub\CSminer\SourceCodeExample\* -nf d -o asdf
CSminer plus
- Number of commenten lines -> numbCommentLines
- Number of commentet lines -> numberOfCommentLines
- Number of comments -> numberOfComments