AGG is a general development environment for graph transformation systems which we use here to specify and analyze program refactorings. In this paper, we consider two commonly used refactorings, namely MoveMethod and EncapsulateField, to show our approach.