def replacements
      nodes.reject { |node| method_order_correct?(node) }.each_with_object({}) do |node, obj|
        node_to_replace = nodes[expected_method_index(node)]

        obj[node] = {
          node => node_to_replace,
          node_to_replace => nodes[expected_method_index(node_to_replace)]
        }
      end
    end
def replacements
      nodes.reject { |node| method_order_correct?(node) }.each_with_object({}) do |node, obj|
        node_to_replace = nodes[expected_method_index(node)]

        obj[node] = {
          node => node_to_replace,
          node_to_replace => nodes[expected_method_index(node_to_replace)]
        }
      end
    end
Build a hash for every node that is not at the correct, final position
 which includes any nodes that need to be moved. Used for autocorrecting.