def find_locations(query)
query_path = query[:path]
query_line = query[:line]
query_method_name = query[:method_name]
available_locations = target_method_locations(query_path)
if query_line
available_locations = available_locations.sort_by do |location|
-location[:line]
end
available_location = available_locations.find do |location|
query_line >= location[:line]
end
return [] if available_location.nil?
return [] if available_location[:test_case] != self
available_locations = [available_location]
end
if query_method_name
available_location = available_locations.find do |location|
location[:test_case] == self and
query_method_name == location[:method_name]
end
return [] if available_location.nil?
available_locations = [available_location]
end
available_locations
end