1.重复的代码 Duplicated code
--Solution: Extract method,pull up method, form template method, subsititute algorithm, extract class
2.过长的函数Long method
--Solution: Extract method, replace temp with query, introduce parameter object, perserve whole object, replace method with method object, decompose conditional
3. 过大类 Large class
--Solution: Extract class, extract subclass, extract interface, duplicate observed data
4, 过长的参数列表
--Solution: Replace parameter with method, perserve whole object, introduce parameter object
5. 发散式变化 Divergent Change
--Solution: Extract class
6. 霰弹式修改 Shotgun Surgery
--Solution: Move method, move field, inline class
7. 依恋情结 feature envy
--Solution: Move method, Extract method
8. 数据泥团 Data clumps
--Solution: Extract class,perserve whole object, introduce parameter object
9. 基本类型偏执 Primitive Obsession
--Solution: Replace data value with object, replace type code with class/subclass, replace type code with state/strategy
10. Switch惊悚现身
--Solution: Replace conditional with polymorphism
11. 平行继承体系Parallel inheritance Hierarchies
--Solution: reference, move method/field
12. Lazy Class冗赘类
--Solution: collapse Hierarchy, inline class
13. Speculative generality 夸夸其谈未来性
--Solution: collapse Hierarchy, inline class, remove parameter, rename method
14. Temporary Field 令人迷惑的暂时值域
--Solution: Extrace class, Introduce Null Object
15. Message Chains 过度耦合的消息链
--Solution: Hide Delegate, extract method, move method
16.Middle Man 中间转手人
--Solution: Remove Middle man, Inline Method, Replace Delegation with Inheriance
17. Inappropriate Intimacy 狎昵关系
--Solution: Move method, Move Field, Change bidirectional Association to Unidirectional, Extrace class, Hide delegate
18. Alternative Classes with Different interfaces 异曲同工的类
--Solution: Rename method, Move method, Extrace superclass
19.Incomplete Library Class 不完美的程序库类
--Solution: Introduce foreign method, Introduce local extension
20. Data Class 纯稚的数据类
--Solution: Encapsulate Collection, Remove Setting method, Move method, Extrace method, Hide method
21. Refused Bequest 被拒绝的遗赠
--Solution: Replace Inheritance with Delegation
22. Comments 过多的注释
--Solutioni: Extrace Method, Rename Method, Introduce Assertion