A dispensable is something pointless and unneeded whose absence would make the code cleaner, more efficient and easier to understand.


A method is filled with explanatory comments.

Duplicate Code

Two code fragments look almost identical.

Lazy Class

Understanding and maintaining classes always costs time and money. So if a class doesn't do enough to earn your attention, it should be deleted.

Data Class

A data class refers to a class that contains only fields and crude methods for accessing them (getters and setters). These are simply containers for data used by other classes. These classes do not contain any additional functionality and cannot independently operate on the data that they own.

Dead Code

A variable, parameter, field, method or class is no longer used (usually because it is obsolete).

Speculative Generality

There is an unused class, method, field or parameter.

Tired of reading?

No wonder, there are 7 hours worth of the text on this website.

Try out something different. We've just launched the interactive learning course on refactoring. It has more content and much more fun than a boring text.

Learn more...