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.

Example: attribute target of type Vector. It is unclear whether a change affects one or multiple instances in the collection.

Related smells: Says many but contains one

Reference

Venera Arnaoudova, Massimiliano Di Penta, Giuliano Antoniol. “Linguistic antipatterns: what they are and how developers perceive them". in Empirical Software Engineering (ESEM), 21(1), Feb 2016. 104-158. 10.1007/s10664-014-9350-8


Implementation Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.