Both the migration from legacy systems to service-oriented systems and maintainance tasks on existing systems require a deep understanding of the existing source code structure and system architecture. Reverse engineering tools are able to reconstruct the system architecture from existing implementations and are therefore one of the most important means in this case. Nevertheless a system architecture prescinds from implementation details and can hardly be used for direct manipulation of source code. But the migration into service-oriented frameworks is not only a problem of architectural redesign, but in fact a problem of code rewriting. A different and possibly better way to analyse a legacy system can be to support reengineering results by an abstract syntax tree that is extended to an abstract syntax graph by adding additional information. Manipulations can be done directly on the abstract syntax graph and therefore on the source code, which guarantees consistency between model and source code.