<commit_before>require 'uri'

module Aws
  module S3
    class Bucket

      # Deletes all objects and versioned objects from this bucket
      #
      # @example
      #
      #   bucket.clear!
      #
      # @return [void]
      def clear!
        object_versions.delete
      end

      # Deletes all objects and versioned objects from this bucket and
      # then deletes the bucket.
      #
      # @example
      #
      #   bucket.delete!
      #
      # @option options [Float]  :initial_wait (1.3) Initial wait time. Exponentially increased for each attempt.
      #                 [Fixnum] :max_attempts (3) Maximum number of attempts to make before raising Errors::BucketNotEmpty.
      #
      # @return [void]
      DELETE_BANG_DEFAULTS = { initial_wait: 1.3, max_attempts: 3 }

      def delete! options = { }
        options = DELETE_BANG_DEFAULTS.merge options

        attempts = 0

        begin<commit_msg>Remove deprecation warning in S3::Bucket#clear!<commit_after>require 'uri'

module Aws
  module S3
    class Bucket

      # Deletes all objects and versioned objects from this bucket
      #
      # @example
      #
      #   bucket.clear!
      #
      # @return [void]
      def clear!
        object_versions.batch_delete!
      end

      # Deletes all objects and versioned objects from this bucket and
      # then deletes the bucket.
      #
      # @example
      #
      #   bucket.delete!
      #
      # @option options [Float]  :initial_wait (1.3) Initial wait time. Exponentially increased for each attempt.
      #                 [Fixnum] :max_attempts (3) Maximum number of attempts to make before raising Errors::BucketNotEmpty.
      #
      # @return [void]
      DELETE_BANG_DEFAULTS = { initial_wait: 1.3, max_attempts: 3 }

      def delete! options = { }
        options = DELETE_BANG_DEFAULTS.merge options

        attempts = 0

        begin
{'fraction_non_alphanumeric': 0.07546174142480211, 'fraction_numerical': 0.008970976253298154, 'mean_word_length': 1.995260663507109, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4042564', 'n_tokens_mistral': 570, 'n_tokens_neox': 546, 'n_words': 167}