- Long Method.
Definition: A method contains too many lines of code.
Solution: Take this code and put it in a new method.
- Duplicate Code.
Definition: Two code fragments look almost identical.
Solution: Use Extract Method. Move duplicated code to a separate new method (or function) and replace the old code with a call to the method.