refactoring trace processing + adaptationprimitive processing + refactoring