Closed sac111 closed 2 years ago
A note: not every smells can be detected using metrics; some smells uses heuristics/rules (sometimes combined with metrics)
- Magic number
Any number in code except 0
and 1
is a magic number
- Feature envy
method calls and field accesses to its present class
< method calls and field accesses to another class
- Complex condition
Three or more conditions in a conditional (eg if
statement) block
- Empty catch block
No of statements in the catch block
= 0
Thanks a lot. It means we can not detect these code smells using the datasets while using a machine learning technique.
What metrics along with their threshold value have been used to detect below code smells in the tool? 1.Magic number
Kindly provide the response as I could not find it.