tushartushar / DesigniteJava

Detects smells and computes metrics of Java code
https://www.designite-tools.com/products-dj
Apache License 2.0
172 stars 64 forks source link

Wrong calculation of the Imperative Abstraction smell #59

Closed AntonisGkortzis closed 6 years ago

AntonisGkortzis commented 6 years ago

https://github.com/tushartushar/DesigniteJava/blob/73f27ed47f76cdeda59af952d877df9d432497a9/src/Designite/smells/designSmells/AbstractionSmellDetector.java#L39

The calculation of the Imperative Abstraction smell should be based on the number of public methods and not on the number of public fields. This smell should be detected only when a Type has one (and only one) public method and this method has lines of code > threshold.

AntonisGkortzis commented 6 years ago

Fixed in commit 61168c69f6d40e70cac16788ba7b8086e8a861ab