<commit_before>module DependencyGrapher
	require 'graphviz'
	class Grapher
    def initialize(dependencies)
      @analyzer = Analyzer.new(dependencies)
      @dependencies = dependencies
    end

		def graph
      @graph = GraphViz.digraph( :G, type: :digraph)
      @clusters = []
      @dependencies.each do |dependency|
        # Methods from the dependencies
        caller = dependency.caller
        receiver = dependency.receiver
        # Create clusters
        create_clusters_from(caller.defined_class)
        create_clusters_from(receiver.defined_class)
        # Create nodes
        create_node_from(caller)
        create_node_from(receiver)
        # Create edge
        #calling_node = caller.method_id.to_s
        #receiving_node = caller.method_id.to_s
        #@graph.add_edges(calling_node, receiving_node)
      end

      # Generate graph
      graph.output( png: "graph.png")
		end

    private
    # Given a Class object, returns an array with each subclass as a string element
    # Ex. Minitest::Test => ["Minitest", "Test"]
    def class_to_a(klass)
      klass.to_s.split("::")
    end<commit_msg>Try without nodes too<commit_after>module DependencyGrapher
	require 'graphviz'
	class Grapher
    def initialize(dependencies)
      @analyzer = Analyzer.new(dependencies)
      @dependencies = dependencies
    end

		def graph
      @graph = GraphViz.digraph( :G, type: :digraph)
      @clusters = []
      @dependencies.each do |dependency|
        # Methods from the dependencies
        caller = dependency.caller
        receiver = dependency.receiver
        # Create clusters
        create_clusters_from(caller.defined_class)
        create_clusters_from(receiver.defined_class)
        # Create nodes
        #create_node_from(caller)
        #create_node_from(receiver)
        # Create edge
        #calling_node = caller.method_id.to_s
        #receiving_node = caller.method_id.to_s
        #@graph.add_edges(calling_node, receiving_node)
      end

      # Generate graph
      graph.output( png: "graph.png")
		end

    private
    # Given a Class object, returns an array with each subclass as a string element
    # Ex. Minitest::Test => ["Minitest", "Test"]
    def class_to_a(klass)
      klass.to_s.split("::")
    end
{'fraction_non_alphanumeric': 0.0855379188712522, 'fraction_numerical': 0.0, 'mean_word_length': 2.6834415584415585, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1764551', 'n_tokens_mistral': 706, 'n_tokens_neox': 681, 'n_words': 158}