These UML diagrams are before-and-after representations for some important refactorings. See Fowler et al., Refactoring: Improving the Design of Existing Code , for a full catalog of transformations and the steps that will let you safely apply them.