<commit_before>require 'cucumber/ast/feature_element'

module Cucumber
  module Ast
    class Scenario #:nodoc:
      include FeatureElement
      
      attr_reader :name, :line
      
      class EmptyBackground 
        def failed?
          false
        end
        
        def feature_elements
          []
        end
        
        def step_collection(step_invocations)
          StepCollection.new(step_invocations)
        end
      end
      
      def initialize(background, comment, tags, line, keyword, name, raw_steps)
        @background = background || EmptyBackground.new
        @comment, @tags, @line, @keyword, @name, @raw_steps = comment, tags, line, keyword, name, raw_steps
        @background.feature_elements << self
        @exception = @executed = nil
        init
      end

      def init
        return if @steps
        attach_steps(@raw_steps)
        step_invocations = @raw_steps.map{|step| step.step_invocation}
        @steps = @background.step_collection(step_invocations)
      end

      def accept(visitor)
        return if Cucumber.wants_to_quit
        
        with_visitor(visitor) do
          visitor.visit_comment(@comment) unless @comment.empty?
          visitor.visit_tags(@tags)
          visitor.visit_scenario_name(@keyword, @name, file_colon_line(@line), source_indent(first_line_length))

          skip_invoke! if @background.failed?
          visitor.step_mother.before_and_after(self, skip_hooks?) do
            skip_invoke! if failed?<commit_msg>Defer more<commit_after>require 'cucumber/ast/feature_element'

module Cucumber
  module Ast
    class Scenario #:nodoc:
      include FeatureElement
      
      attr_reader :name, :line
      
      class EmptyBackground 
        def failed?
          false
        end
        
        def feature_elements
          []
        end
        
        def step_collection(step_invocations)
          StepCollection.new(step_invocations)
        end
      end
      
      def initialize(background, comment, tags, line, keyword, name, raw_steps)
        @background = background || EmptyBackground.new
        @comment, @tags, @line, @keyword, @name, @raw_steps = comment, tags, line, keyword, name, raw_steps
        @exception = @executed = nil
        init
      end

      def init
        return if @steps
        @background.feature_elements << self
        attach_steps(@raw_steps)
        step_invocations = @raw_steps.map{|step| step.step_invocation}
        @steps = @background.step_collection(step_invocations)
      end

      def accept(visitor)
        return if Cucumber.wants_to_quit
        
        with_visitor(visitor) do
          visitor.visit_comment(@comment) unless @comment.empty?
          visitor.visit_tags(@tags)
          visitor.visit_scenario_name(@keyword, @name, file_colon_line(@line), source_indent(first_line_length))

          skip_invoke! if @background.failed?
          visitor.step_mother.before_and_after(self, skip_hooks?) do
            skip_invoke! if failed?
{'fraction_non_alphanumeric': 0.07817157999337529, 'fraction_numerical': 0.0, 'mean_word_length': 2.282608695652174, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4864792', 'n_tokens_mistral': 859, 'n_tokens_neox': 844, 'n_words': 188}