| Id | Name | Definition | Python File |
|---|---|---|---|
| A.1 | Get more than accessor | A getter that performs actions other than returning the corresponding attribute. | get_more_than_accessor.py |
| A.2 | Is returns more than a Boolean | The name of a method is a predicate suggesting a true/false value in return. However the return type is not Boolean but rather a more complex type. | is_no_return_bool.py |
| A.3 | Set method returns | A set method having a return type different than void. | set_returns.py |
| A.4 | Expecting but not getting single instance | The name of a method indicates that a single object is returned but the return type is a collection. | expecting_not_getting_single.py |
| B.1 | Not implemented condition | The comments of a method suggest a conditional behavior that is not implemented in the code. When the implementation is default this should be documented | not_implemented_condition.py |
| B.2 | Validation method does not confirm | A validation method (e.g., name starting with validate, check, ensure) does not confirm the validation, i.e., the method neither provides a return value informing whether the validation was successful, nor documents how to proceed to understand. | validate_not_confirm.py |
| B.3 | Get method does not return | The name suggests that the method returns something (e.g., name starts with get or return) but the return type is void. | get_no_return.py |
| B.4 | Not answered question | The name of a method is in the form of predicate whereas the return type is not Boolean. | not_answered_question.py |
| B.5 | Transform method does not return | The name of a method suggests the transformation of an object but there is no return value and it is not clear from the documentation where the result is stored. | transform_not_return.py |
| B.6 | Expecting but not getting a collection | The name of a method suggests that a collection should be returned but a single object or nothing is returned. | expecting_not_getting_collection.py |
| C.1 | Method name and return type are opposite | The documentation of a method is in contradiction with its declaration. | method_name_return_opposite.py |
| C.2 | Method signature and comment are opposite | The name of an attribute suggests a single instance, while its type suggests that the attribute stores a collection of objects. | method_signature_comment_opposite.py |
| D.1 | Says one but contains many | The name of an attribute suggests a single instance, while its type suggests that the attribute stores a collection of objects. | says_one_contains_many.py |
| D.2 | Name suggests boolean but type is not | The name of an attribute suggests that its value is true or false, but its declaring type is not Boolean. | name_suggest_boolean_type_not.py |
| E.1 | Says many but contains one | The name of an attribute suggests multiple instances, but its type suggests a single one. | says_many_contains_one.py |
| F.1 | Attribute name and type are opposite | The name of an attribute is in contradiction with its type as they contain antonyms. | attribute_name_type_opposite.py |
| F.2 | Attribute signature and comment are opposite | The declaration of an attribute is in contradiction with its documentation. | attribute_signature_comment_opposite.py |
Definitions for the above anti-patterns are available here
[1] Arnaoudova, V., Di Penta, M., & Antoniol, G. (2016). Linguistic antipatterns: What they are and how developers perceive them. Empirical Software Engineering, 21(1), 104-158.