Software architecture recovery based on weighted hierarchical clustering