The paper addresses two problems in software maintenance. Firstly, some maintenance tasks require modifications of the grammar. A change in a grammar can make syntax and transformation rules outdated, which then themselves become subject to a maintenance process. Secondly, it is essential that after a repair programs look as much as possible as they looked before. Especially comments and principle readability by humans are indispensable for further maintenance. that necessary changes of both abstract syntax and transformation rules due to grammar extension can be made automatically. Thus, most of the original rules can be reused. The approach can be used to define and use simplified views on complex patterns to be analysed with transformation rules. To give an example we apply the described technique to rule-based program transformations extended with partial layout preservation. The migration relation is given. The programmer uses common rewriting techniques for program transforma...