This paper represents a technique for recovering the Software Architecture based on Graph Pattern Matching by the help of mining Techniques. Generally Software Architecture is represented in terms of graphs with set of vertices and edges. Finding the frequent data sets is the major step in the software architecture recovery. Many algorithms are proposed for this, for example Apriori based. In this paper to find the frequent data sets and a maximum association between the graphs we used an efficient algorithm called TMGM (tree based Maximal Graph Mining Technique). The results have shown that our proposed Graph mining technique is more efficient in recovering the Software Architecture. For pattern matching problem, Software Architecture Recovery uses A* Algorithm which runs in exponential time. In this paper we proposed an algorithm which runs in linear time through stable marriage problem.