Model-driven Detection of Design Pattern