<commit_before>module Xcodeproj
  class Project
    module Object

      class PBXGroup < PBXObject
        attributes :sourceTree

        has_many :children, :class => PBXObject do |object|
          if object.is_a?(Xcodeproj::Project::Object::PBXFileReference)
            # Associating the file to this group through the inverse
            # association will also remove it from the group it was in.
            object.group = self
          else
            # TODO What objects can actually be in a group and don't they
            # all need the above treatment.
            childReferences << object.uuid
          end
        end

        def initialize(*)
          super
          self.sourceTree ||= '<group>'
          self.childReferences ||= []
        end

        def name
          if name = super
            name
          elsif attributes.has_key?('path')
            File.basename(attributes['path'])
          elsif @project.main_group.uuid == uuid
            'Main Group'
          end
        end

        def files
          list_by_class(childReferences, Xcodeproj::Project::PBXFileReference) do |file|
            file.group = self
          end
        end

        def create_file(path)
          files.new("path" => path)
        end

        def file_with_path(path)
          files.find { |f| f.path == path }
        end

        def source_files
          files = self.files.reject { |file| file.buildFiles.empty? }
          list_by_class(childReferences, Xcodeproj::Project::PBXFileReference, files) do |file|
            file.group = self
          end
        end

        def groups
          list_by_class(childReferences, Xcodeproj::Project::PBXGroup)
        end
<commit_msg>Fixed some class references to point to the new module.<commit_after>module Xcodeproj
  class Project
    module Object

      class PBXGroup < PBXObject
        attributes :sourceTree

        has_many :children, :class => PBXObject do |object|
          if object.is_a?(Xcodeproj::Project::Object::PBXFileReference)
            # Associating the file to this group through the inverse
            # association will also remove it from the group it was in.
            object.group = self
          else
            # TODO What objects can actually be in a group and don't they
            # all need the above treatment.
            childReferences << object.uuid
          end
        end

        def initialize(*)
          super
          self.sourceTree ||= '<group>'
          self.childReferences ||= []
        end

        def name
          if name = super
            name
          elsif attributes.has_key?('path')
            File.basename(attributes['path'])
          elsif @project.main_group.uuid == uuid
            'Main Group'
          end
        end

        def files
          list_by_class(childReferences, Xcodeproj::Project::Object::PBXFileReference) do |file|
            file.group = self
          end
        end

        def create_file(path)
          files.new("path" => path)
        end

        def file_with_path(path)
          files.find { |f| f.path == path }
        end

        def source_files
          files = self.files.reject { |file| file.buildFiles.empty? }
          list_by_class(childReferences, Xcodeproj::Project::Object::PBXFileReference, files) do |file|
            file.group = self
          end
        end

        def groups
          list_by_class(childReferences, Xcodeproj::Project::Object::PBXGroup)
        end

{'fraction_non_alphanumeric': 0.07676940639269407, 'fraction_numerical': 0.0, 'mean_word_length': 1.7191621411947247, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '7470933', 'n_tokens_mistral': 942, 'n_tokens_neox': 913, 'n_words': 265}