refactored method exploration logic into MethodRelation and made DependencyRelation and AggregationRelation inherit from it