Don't Repeat Yourself report Result

Processed a total of 26964 significant (62490 raw) lines in 390 files
Found 2512 duplicate lines in 434 blocks in 155 files

Found 3 duplicate lines in the following files:
  Between lines 1328 and 1331 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 1312 and 1315 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 1212 and 1215 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 1195 and 1198 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 1120 and 1123 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
                  val[0].push val[2]
val[0]
end
.,.,

Found 3 duplicate lines in the following files:
  Between lines 8 and 11 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/transactions.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/layout.rb
  Between lines 360 and 362 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/integration.rb
  Between lines 196 and 198 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/caching.rb
  Between lines 66 and 68 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/caching.rb
  Between lines 7 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
  
  [Show duplicate lines source code]
    def self.included(base)
base.extend(ClassMethods)

base.class_eval do

Found 3 duplicate lines in the following files:
  Between lines 71 and 77 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 37 and 43 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  
  [Show duplicate lines source code]
          )
end

# Uses Date to provide precise Time calculations for years, months, and days. The +options+ parameter takes a hash with
# any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.
def advance(options)
d = to_date.advance(options)

Found 3 duplicate lines in the following files:
  Between lines 31 and 35 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  Between lines 62 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  
  [Show duplicate lines source code]
          merge_options_from_reflection!(options)

# Pass through args exactly as we received them.
args << options
@reflection.klass.find(*args)

Found 3 duplicate lines in the following files:
  Between lines 3 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/reflection.rb
  Between lines 4 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/calculations.rb
  Between lines 3 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/verification.rb
  Between lines 605 and 609 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/caching.rb
  Between lines 3 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/adv_attr_accessor.rb
  
  [Show duplicate lines source code]
    def self.included(base)
base.extend(ClassMethods)
end

module ClassMethods #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 27 and 29 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/flash.rb
  Between lines 38 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/components.rb
  
  [Show duplicate lines source code]
    def self.included(base) #:nodoc:
base.class_eval do
include InstanceMethods

Found 3 duplicate lines in the following files:
  Between lines 545 and 548 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
  Between lines 534 and 538 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
  
  [Show duplicate lines source code]
            filter_chain.each_with_index do |f,i|
return i if f.after?
end
end
return -1

Found 3 duplicate lines in the following files:
  Between lines 85 and 91 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 51 and 57 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  
  [Show duplicate lines source code]
        def ago(seconds)
self.since(-seconds)
end

# Returns a new DateTime representing the time a number of seconds since the instance time
# Do not use this method in combination with x.months, use months_since instead!
def since(seconds)

Found 3 duplicate lines in the following files:
  Between lines 212 and 216 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  Between lines 584 and 589 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  
  [Show duplicate lines source code]
      def rename_table(name, new_name)
execute "ALTER TABLE #{name} RENAME TO #{new_name}"
end

# Adds a column to a table.
def add_column(table_name, column_name, type, options = {})

Found 3 duplicate lines in the following files:
  Between lines 464 and 466 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
  Between lines 458 and 460 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
  
  [Show duplicate lines source code]
        create_action_options = action_options_for("create", resource)
map.connect(resource.path, create_action_options)
map.connect("#{resource.path}.:format", create_action_options)

Found 3 duplicate lines in the following files:
  Between lines 8 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  Between lines 6 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/observer.rb
  
  [Show duplicate lines source code]
    def self.included(base)
base.extend ClassMethods
end

module ClassMethods

Found 3 duplicate lines in the following files:
  Between lines 174 and 179 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 155 and 159 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  
  [Show duplicate lines source code]
        alias :at_beginning_of_month :beginning_of_month

# Returns a new Date/DateTime representing the end of the month (last day of the month; DateTime objects will have time set to 0:00)
def end_of_month
last_day = ::Time.days_in_month( self.month, self.year )

Found 3 duplicate lines in the following files:
  Between lines 1355 and 1358 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  Between lines 1295 and 1299 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
            add_joins!(sql, options, scope)
end

add_conditions!(sql, options[:conditions], scope)
add_group!(sql, options[:group], scope)

Found 3 duplicate lines in the following files:
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/integer/inflections.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/integer/even_odd.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Integer #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 64 and 70 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
  Between lines 52 and 58 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
  
  [Show duplicate lines source code]
        def to_date
::Date.new(year, month, day)
end

# Attempts to convert self to a Ruby Time object; returns self if out of range of Ruby Time class
# If self has an offset other than 0, self will just be returned unaltered, since there's no clean way to map it to a Time
def to_time

Found 3 duplicate lines in the following files:
  Between lines 242 and 244 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  Between lines 176 and 178 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  
  [Show duplicate lines source code]
        else
object = record_or_name_or_array
object_name = ActionController::RecordIdentifier.singular_class_name(object)

Found 3 duplicate lines in the following files:
  Between lines 625 and 629 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 593 and 597 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  
  [Show duplicate lines source code]
        else
puts "failed: #{uri.ljust(50)}"
end
end
Repositories.instance.save

Found 3 duplicate lines in the following files:
  Between lines 10 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session_management.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
  
  [Show duplicate lines source code]
    def self.included(base)
base.class_eval do
extend ClassMethods

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/unicode.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/starts_ends_with.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/iterators.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/conversions.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/string/access.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module String #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 135 and 137 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
  Between lines 1189 and 1191 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  Between lines 150 and 152 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/components.rb
  Between lines 28 and 30 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
  
  [Show duplicate lines source code]
          result
else
yield

Found 3 duplicate lines in the following files:
  Between lines 26 and 28 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  Between lines 15 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  
  [Show duplicate lines source code]
      target.class_eval <<-'end_eval'
def all_hashes
rows = []

Found 3 duplicate lines in the following files:
  Between lines 14 and 16 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/query_cache.rb
  Between lines 5 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/query_cache.rb
  
  [Show duplicate lines source code]
      if ActiveRecord::Base.configurations.blank?
yield
else

Found 3 duplicate lines in the following files:
  Between lines 31 and 34 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/simple_logger.rb
  Between lines 20 and 23 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/simple_logger.rb
  
  [Show duplicate lines source code]
        if block_given?
begin
block.call
ensure

Found 3 duplicate lines in the following files:
  Between lines 568 and 570 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  Between lines 154 and 156 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  
  [Show duplicate lines source code]
          if attributes.is_a?(Array)
attributes.collect { |attr| create(attr) }
else

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module DateTime #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 1692 and 1694 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 1625 and 1627 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
                          klass.quote_value(parent.active_record.base_class.name)
]
else

Found 3 duplicate lines in the following files:
  Between lines 393 and 398 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 369 and 376 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  
  [Show duplicate lines source code]
            matched = false
break
end
end
end

# Pseudo class matches (nth-child, empty, etc).
if matched

Found 3 duplicate lines in the following files:
  Between lines 1229 and 1231 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/routing.rb
  Between lines 1188 and 1190 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/routing.rb
  
  [Show duplicate lines source code]
              protected :#{selector}
end_eval
helpers << selector

Found 3 duplicate lines in the following files:
  Between lines 72 and 74 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
  Between lines 167 and 169 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  
  [Show duplicate lines source code]
        def construct_scope
create_scoping = {}
set_belongs_to_association_for(create_scoping)

Found 3 duplicate lines in the following files:
  Between lines 10 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/scripts.rb
  Between lines 85 and 90 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/base.rb
  
  [Show duplicate lines source code]
    class Base
include Options

# Declare default options for the generator. These options
# are inherited to subclasses.
default_options :collision => :ask, :quiet => false

Found 3 duplicate lines in the following files:
  Between lines 84 and 86 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  Between lines 76 and 78 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  Between lines 68 and 70 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  
  [Show duplicate lines source code]
      [
/\A(?:[#{atomchars}]+|#{iso2022str}|#{eucstr})+/n,
/\A(?:[#{tokenchars}]+|#{iso2022str}|#{eucstr})+/n,

Found 3 duplicate lines in the following files:
  Between lines 122 and 124 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb
  Between lines 100 and 102 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/tag_assertions.rb
  
  [Show duplicate lines source code]
        clean_backtrace do
opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first
tag = find_tag(opts)

Found 3 duplicate lines in the following files:
  Between lines 313 and 315 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/test_process.rb
  Between lines 79 and 84 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb
  Between lines 22 and 26 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/drb_store.rb
  
  [Show duplicate lines source code]
      def close
update
end

def delete

Found 3 duplicate lines in the following files:
  Between lines 29 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/webrick.rb
  Between lines 24 and 26 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/mongrel.rb
  
  [Show duplicate lines source code]
  opts.on("-e", "--environment=name", String,
"Specifies the environment to run this server under (test/development/production).",
"Default: development") { |v| OPTIONS[:environment] = v }

Found 3 duplicate lines in the following files:
  Between lines 29 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
  Between lines 18 and 20 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
  
  [Show duplicate lines source code]
    respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @<%= file_name %> }

Found 3 duplicate lines in the following files:
  Between lines 1 and 4 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
  Between lines 6 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/routing.rb
  
  [Show duplicate lines source code]
class Object
def to_param
to_s

Found 3 duplicate lines in the following files:
  Between lines 76 and 78 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
  Between lines 62 and 64 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
  Between lines 35 and 37 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
  Between lines 114 and 116 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
  
  [Show duplicate lines source code]
    def add_options!(opt)
opt.separator ''
opt.separator 'Options:'

Found 3 duplicate lines in the following files:
  Between lines 28 and 32 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/mongrel.rb
  Between lines 43 and 47 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spinner.rb
  Between lines 199 and 203 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
  Between lines 142 and 146 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/reaper.rb
  Between lines 61 and 65 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/inspector.rb
  
  [Show duplicate lines source code]
  opts.separator ""

opts.on("-h", "--help", "Show this help message.") { puts opts; exit }

opts.parse!

Found 3 duplicate lines in the following files:
  Between lines 5 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 7 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  Between lines 5 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  
  [Show duplicate lines source code]
      module Calculations
def self.included(base) #:nodoc:
base.extend ClassMethods

Found 3 duplicate lines in the following files:
  Between lines 320 and 323 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
  Between lines 223 and 226 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb
  
  [Show duplicate lines source code]
        options = sources.extract_options!.stringify_keys
cache = options.delete("cache")

if ActionController::Base.perform_caching && cache

Found 3 duplicate lines in the following files:
  Between lines 78 and 576 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 9 and 111 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/aggregations.rb
  
  [Show duplicate lines source code]
        instance_variable_set "@#{assoc.name}", nil
end unless self.new_record?
end

# Active Record implements aggregation through a macro-like class method called +composed_of+ for representing attributes
# as value objects. It expresses relationships like "Account [is] composed of Money [among other things]" or "Person [is]
# composed of [an] address". Each call to the macro adds a description of how the value objects are created from the
# attributes of the entity object (when the entity is initialized either as a new object or from finding an existing object)
# and how it can be turned back into attributes (when the entity is saved to the database). Example:
#
# class Customer < ActiveRecord::Base
# composed_of :balance, :class_name => "Money", :mapping => %w(balance amount)
# composed_of :address, :mapping => [ %w(address_street street), %w(address_city city) ]
# end
#
# The customer class now has the following methods to manipulate the value objects:
# * <tt>Customer#balance, Customer#balance=(money)</tt>
# * <tt>Customer#address, Customer#address=(address)</tt>
#
# These methods will operate with value objects like the ones described below:
#
# class Money
# include Comparable
# attr_reader :amount, :currency
# EXCHANGE_RATES = { "USD_TO_DKK" => 6 }
#
# def initialize(amount, currency = "USD")
# @amount, @currency = amount, currency
# end
#
# def exchange_to(other_currency)
# exchanged_amount = (amount * EXCHANGE_RATES["#{currency}_TO_#{other_currency}"]).floor
# Money.new(exchanged_amount, other_currency)
# end
#
# def ==(other_money)
# amount == other_money.amount && currency == other_money.currency
# end
#
# def <=>(other_money)
# if currency == other_money.currency
# amount <=> amount
# else
# amount <=> other_money.exchange_to(currency).amount
# end
# end
# end
#
# class Address
# attr_reader :street, :city
# def initialize(street, city)
# @street, @city = street, city
# end
#
# def close_to?(other_address)
# city == other_address.city
# end
#
# def ==(other_address)
# city == other_address.city && street == other_address.street
# end
# end
#
# Now it's possible to access attributes from the database through the value objects instead. If you choose to name the
# composition the same as the attribute's name, it will be the only way to access that attribute. That's the case with our
# +balance+ attribute. You interact with the value objects just like you would any other attribute, though:
#
# customer.balance = Money.new(20) # sets the Money value object and the attribute
# customer.balance # => Money value object
# customer.balance.exchanged_to("DKK") # => Money.new(120, "DKK")
# customer.balance > Money.new(10) # => true
# customer.balance == Money.new(20) # => true
# customer.balance < Money.new(5) # => false
#
# Value objects can also be composed of multiple attributes, such as the case of Address. The order of the mappings will
# determine the order of the parameters. Example:
#
# customer.address_street = "Hyancintvej"
# customer.address_city = "Copenhagen"
# customer.address # => Address.new("Hyancintvej", "Copenhagen")
# customer.address = Address.new("May Street", "Chicago")
# customer.address_street # => "May Street"
# customer.address_city # => "Chicago"
#
# == Writing value objects
#
# Value objects are immutable and interchangeable objects that represent a given value, such as a +Money+ object representing
# $5. Two +Money+ objects both representing $5 should be equal (through methods such as == and <=> from +Comparable+ if ranking
# makes sense). This is unlike entity objects where equality is determined by identity. An entity class such as +Customer+ can
# easily have two different objects that both have an address on Hyancintvej. Entity identity is determined by object or
# relational unique identifiers (such as primary keys). Normal <tt>ActiveRecord::Base</tt> classes are entity objects.
#
# It's also important to treat the value objects as immutable. Don't allow the +Money+ object to have its amount changed after
# creation. Create a new +Money+ object with the new value instead. This is exemplified by the <tt>Money#exchanged_to</tt> method that
# returns a new value object instead of changing its own values. Active Record won't persist value objects that have been
# changed through means other than the writer method.
#
# The immutable requirement is enforced by Active Record by freezing any object assigned as a value object. Attempting to
# change it afterwards will result in a <tt>TypeError</tt>.
#
# Read more about value objects on http://c2.com/cgi/wiki?ValueObject and on the dangers of not keeping value objects
# immutable on http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable
module ClassMethods

Found 3 duplicate lines in the following files:
  Between lines 1986 and 1988 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  Between lines 268 and 270 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
  
  [Show duplicate lines source code]
              DELETE FROM #{@@table_name}
WHERE #{@@connection.quote_column_name(@@session_id_column)}=#{@@connection.quote(session_id)}
end_sql

Found 3 duplicate lines in the following files:
  Between lines 27 and 29 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
  Between lines 10 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
  
  [Show duplicate lines source code]
    names.each do |name|
class_eval <<-EOS
def self.#{name}

Found 3 duplicate lines in the following files:
  Between lines 78 and 80 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb
  Between lines 258 and 260 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
  
  [Show duplicate lines source code]
              UPDATE #{@@table_name}
SET #{@@connection.quote_column_name(@@data_column)}=#{@@connection.quote(marshaled_data)}
WHERE #{@@connection.quote_column_name(@@session_id_column)}=#{@@connection.quote(session_id)}

Found 3 duplicate lines in the following files:
  Between lines 669 and 671 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 665 and 667 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
    17,    20,    22,   nil,    23,    25,   nil,    32,    29,    31,
nil, nil, 16, 17, 20, 22, nil, 23, 25, nil,
32, 29, 31, nil, nil, 16, 17, 20, 22, nil,

Found 3 duplicate lines in the following files:
  Between lines 1705 and 1707 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 1605 and 1607 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
                  " #{join_type} %s ON %s.%s = %s.%s " % [
table_name_and_alias,
connection.quote_table_name(aliased_table_name),

Found 3 duplicate lines in the following files:
  Between lines 23 and 26 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spinner.rb
  Between lines 139 and 142 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
  Between lines 108 and 111 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/reaper.rb
  Between lines 43 and 46 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/inspector.rb
  
  [Show duplicate lines source code]
  opts.separator ""

opts.on <<-EOF
Description:

Found 3 duplicate lines in the following files:
  Between lines 6 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 275 and 277 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  
  [Show duplicate lines source code]
    def self.included(base) # :nodoc:
base.extend ClassMethods
base.class_eval do

Found 3 duplicate lines in the following files:
  Between lines 361 and 363 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/integration.rb
  Between lines 12 and 16 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  Between lines 9 and 13 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  
  [Show duplicate lines source code]
      base.extend(ClassMethods)

base.class_eval do
# Wrap inherited to create a new master helper module for subclasses.
class << self

Found 3 duplicate lines in the following files:
  Between lines 150 and 152 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
  Between lines 137 and 139 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
  Between lines 127 and 129 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
  
  [Show duplicate lines source code]
          true
rescue LoadError
false

Found 3 duplicate lines in the following files:
  Between lines 803 and 805 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 259 and 261 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  
  [Show duplicate lines source code]
        if alternates = second.instance_variable_get(:@alternates)
second.instance_variable_set(:@alternates, [])
@alternates.concat alternates

Found 3 duplicate lines in the following files:
  Between lines 69 and 72 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  Between lines 52 and 55 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  Between lines 35 and 38 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  
  [Show duplicate lines source code]
          self.class.#{sym} = obj
end
" unless options[:instance_writer] == false }
EOS

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/extract_options.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/access.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Array #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/behavior.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Date #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 315 and 317 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 296 and 298 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 277 and 279 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  
  [Show duplicate lines source code]
        second = next_selector(statement, values)
@depends = lambda do |element, first|
matches = []

Found 3 duplicate lines in the following files:
  Between lines 605 and 607 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
  Between lines 576 and 578 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
  
  [Show duplicate lines source code]
          value = x[key]
return array if value.instance_of?(Hash) || value.instance_of?(Array)
value = normalise_space(value) if @options['normalisespace'] == 1

Found 3 duplicate lines in the following files:
  Between lines 86 and 88 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  Between lines 76 and 78 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  
  [Show duplicate lines source code]
            self.class.module_eval do
define_method(:binary_to_string) do |value|
if value =~ /\\\d{3}/

Found 3 duplicate lines in the following files:
  Between lines 849 and 852 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 844 and 847 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
            " unless #{reflection.name}.nil?'"
)

module_eval(

Found 3 duplicate lines in the following files:
  Between lines 187 and 189 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/deprecation.rb
  Between lines 832 and 834 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/fixtures.rb
  Between lines 514 and 516 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/test_process.rb
  Between lines 63 and 65 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions.rb
  Between lines 61 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/test_helper.rb
  
  [Show duplicate lines source code]
module Test
module Unit
class TestCase

Found 3 duplicate lines in the following files:
  Between lines 1027 and 1029 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 986 and 988 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
          define_method(reflection.name) do |*params|
force_reload = params.first unless params.empty?
association = instance_variable_get("@#{reflection.name}")

Found 3 duplicate lines in the following files:
  Between lines 4 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/template_handlers/rjs.rb
  Between lines 6 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/template_handlers/builder.rb
  
  [Show duplicate lines source code]
      def self.line_offset
2
end

def compile(template)

Found 3 duplicate lines in the following files:
  Between lines 837 and 839 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 815 and 817 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 780 and 782 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 715 and 717 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 642 and 644 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 608 and 610 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 578 and 580 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 551 and 553 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 505 and 507 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 414 and 416 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  
  [Show duplicate lines source code]
    def options
OptionParser.new do |o|
o.set_summary_indent(' ')

Found 3 duplicate lines in the following files:
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/slice.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/keys.rb
  Between lines 90 and 92 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
  Between lines 3 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/except.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/diff.rb
  Between lines 28 and 30 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Hash #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 604 and 606 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 454 and 456 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 285 and 287 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 231 and 233 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb
  
  [Show duplicate lines source code]
        if first
first = false
else

Found 3 duplicate lines in the following files:
  Between lines 46 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb
  Between lines 62 and 64 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb
  
  [Show duplicate lines source code]
  class Numeric #:nodoc:
def blank?
false

Found 3 duplicate lines in the following files:
  Between lines 389 and 391 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  Between lines 377 and 379 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  
  [Show duplicate lines source code]
            options, value
), html_options
)

Found 3 duplicate lines in the following files:
  Between lines 21 and 23 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/http_mock.rb
  Between lines 61 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/connection.rb
  
  [Show duplicate lines source code]
    class << self
def requests
@@requests ||= []

Found 3 duplicate lines in the following files:
  Between lines 80 and 85 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  Between lines 220 and 223 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/attribute_methods.rb
  
  [Show duplicate lines source code]
        else
value
end
else

Found 3 duplicate lines in the following files:
  Between lines 202 and 206 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
  Between lines 75 and 79 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
  
  [Show duplicate lines source code]
    @closed = true
end

def closed?
@closed

Found 3 duplicate lines in the following files:
  Between lines 820 and 822 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 800 and 802 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
          module_eval do
before_save <<-EOF
association = instance_variable_get("@#{reflection.name}")

Found 3 duplicate lines in the following files:
  Between lines 383 and 385 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  Between lines 371 and 373 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  Between lines 362 and 364 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  Between lines 354 and 356 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  
  [Show duplicate lines source code]
        html_options = html_options.stringify_keys
add_default_name_and_id(html_options)
value = value(object)

Found 3 duplicate lines in the following files:
  Between lines 349 and 351 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  Between lines 180 and 182 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/cgi_process.rb
  
  [Show duplicate lines source code]
          retry
else
raise

Found 3 duplicate lines in the following files:
  Between lines 29 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb
  Between lines 12 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb
  
  [Show duplicate lines source code]
        clean_backtrace do
expected_dom = HTML::Document.new(expected).root
actual_dom = HTML::Document.new(actual).root

Found 3 duplicate lines in the following files:
  Between lines 1125 and 1127 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb
  Between lines 1105 and 1107 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/mysql.rb
  
  [Show duplicate lines source code]
    rescue
errno = Error::CR_SERVER_LOST
raise Error::new(errno, Error::err(errno))

Found 3 duplicate lines in the following files:
  Between lines 344 and 348 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb
  Between lines 69 and 73 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/mailbox.rb
  
  [Show duplicate lines source code]
    def inspect
"#<#{self.class} #{@dirname}>"
end

def close

Found 3 duplicate lines in the following files:
  Between lines 157 and 167 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  Between lines 77 and 87 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  
  [Show duplicate lines source code]
          end_eval
end
end

# Declare a controller attribute as a helper. For example,
# helper_attr :name
# attr_accessor :name
# makes the name and name= controller methods available in the view.
# The is a convenience wrapper for helper_method.
def helper_attr(*attrs)
attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }

Found 3 duplicate lines in the following files:
  Between lines 193 and 196 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
  Between lines 83 and 86 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
  
  [Show duplicate lines source code]
          def marshal(data)   Base64.encode64(Marshal.dump(data)) if data end
def unmarshal(data) Marshal.load(Base64.decode64(data)) if data end

def create_table!

Found 3 duplicate lines in the following files:
  Between lines 19 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb
  Between lines 11 and 13 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb
  
  [Show duplicate lines source code]
    yield
ensure
$VERBOSE = old_verbose

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/overlaps.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/include_range.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Range #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 280 and 285 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/validations.rb
  Between lines 973 and 978 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  
  [Show duplicate lines source code]
      errors.empty?
end

# Returns the Errors object that holds all information about attribute error messages.
def errors
@errors ||= Errors.new(self)

Found 3 duplicate lines in the following files:
  Between lines 823 and 825 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 791 and 793 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  
  [Show duplicate lines source code]
    def parse!(args)
options.parse!(args)
root = @base_command.environment.root

Found 3 duplicate lines in the following files:
  Between lines 487 and 490 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/commands.rb
  Between lines 343 and 345 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/commands.rb
  
  [Show duplicate lines source code]
        def migration_template(relative_source, relative_destination, template_options = {})
migration_directory relative_destination
migration_file_name = template_options[:migration_file_name] || file_name

Found 3 duplicate lines in the following files:
  Between lines 147 and 149 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb
  Between lines 140 and 142 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/builder/css.rb
  
  [Show duplicate lines source code]
      _css_block(block) if block
_unify_block
self

Found 3 duplicate lines in the following files:
  Between lines 180 and 183 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/calculations.rb
  Between lines 1251 and 1254 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
          sql << join_dependency.join_associations.collect{|join| join.association_join }.join

add_joins!(sql, options, scope)
add_conditions!(sql, options[:conditions], scope)

Found 3 duplicate lines in the following files:
  Between lines 4 and 6 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
  Between lines 4 and 6 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 4 and 6 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  
  [Show duplicate lines source code]
      def initialize(owner, reflection)
super
construct_sql

Found 3 duplicate lines in the following files:
  Between lines 231 and 233 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/lookup.rb
  Between lines 208 and 210 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/lookup.rb
  
  [Show duplicate lines source code]
          hem = latest[gem.name]
latest[gem.name] = gem if hem.nil? or gem.version > hem.version
latest

Found 3 duplicate lines in the following files:
  Between lines 4 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
  Between lines 2 and 5 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
  Between lines 4 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
  
  [Show duplicate lines source code]
  def manifest
record do |m|
# Check for class naming collisions.
m.class_collisions class_path, class_name, "#{class_name}Test"

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/behavior.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Time #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb
  Between lines 1 and 3 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb
  
  [Show duplicate lines source code]
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Numeric #:nodoc:

Found 3 duplicate lines in the following files:
  Between lines 113 and 115 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb
  Between lines 108 and 110 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb
  Between lines 103 and 105 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/obsolete.rb
  
  [Show duplicate lines source code]
    alias new_mail new_port
alias each_mail each_port
alias each_newmail each_new_port

Found 3 duplicate lines in the following files:
  Between lines 647 and 649 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 556 and 558 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 510 and 512 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  
  [Show duplicate lines source code]
        o.separator   ""        
o.separator "Options:"
o.separator ""

Found 4 duplicate lines in the following files:
  Between lines 1482 and 1486 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  Between lines 1505 and 1509 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  
  [Show duplicate lines source code]
            attribute_names = extract_attribute_names_from_match(match)
super unless all_attributes_exists?(attribute_names)

self.class_eval %{
def self.#{method_id}(*args)

Found 4 duplicate lines in the following files:
  Between lines 134 and 137 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 186 and 189 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
          unless tok
@racc_t = 0
else
@racc_t = (token_table[tok] or 1) # error token

Found 4 duplicate lines in the following files:
  Between lines 54 and 57 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  Between lines 80 and 83 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  
  [Show duplicate lines source code]
        klass = through.klass
klass.transaction do
flatten_deeper(records).each do |associate|
raise_on_type_mismatch(associate)

Found 4 duplicate lines in the following files:
  Between lines 238 and 241 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  Between lines 373 and 376 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
  Between lines 171 and 174 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  
  [Show duplicate lines source code]
        when Array
object = record_or_name_or_array.last
object_name = ActionController::RecordIdentifier.singular_class_name(object)
apply_form_for_options!(record_or_name_or_array, options)

Found 4 duplicate lines in the following files:
  Between lines 260 and 265 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  Between lines 260 and 267 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  
  [Show duplicate lines source code]
          disconnect!
connect
end
end

# Close the connection.
def disconnect!
@connection.close rescue nil

Found 4 duplicate lines in the following files:
  Between lines 6 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails/plugin/loader.rb
  Between lines 10 and 19 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails/plugin/locator.rb
  
  [Show duplicate lines source code]
      attr_reader :initializer

def initialize(initializer)
@initializer = initializer
end

# This method should return all the plugins which this Plugin::Locator can find
# These will then be used by the current Plugin::Loader, which is responsible for actually
# loading the plugins themselves
def plugins

Found 4 duplicate lines in the following files:
  Between lines 106 and 109 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  Between lines 182 and 185 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  
  [Show duplicate lines source code]
          :float       => { :name => "float" },
:decimal => { :name => "decimal" },
:datetime => { :name => "datetime" },
:timestamp => { :name => "datetime" },

Found 4 duplicate lines in the following files:
  Between lines 2 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
  Between lines 4 and 10 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
  
  [Show duplicate lines source code]
  def manifest
record do |m|
# Check for class naming collisions.
m.class_collisions class_path, class_name, "#{class_name}Test"

# Model, test, and fixture directories.
m.directory File.join('app/models', class_path)

Found 4 duplicate lines in the following files:
  Between lines 26 and 29 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  Between lines 43 and 46 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  Between lines 60 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
  
  [Show duplicate lines source code]
    options = syms.extract_options!
syms.each do |sym|
class_eval <<-EOS
def self.#{sym}=(obj)

Found 4 duplicate lines in the following files:
  Between lines 26 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  Between lines 34 and 39 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  
  [Show duplicate lines source code]
      def find(*args)
options = args.extract_options!

# If using a custom finder_sql, scan the entire collection.
if @reflection.options[:finder_sql]
expects_array = args.first.kind_of?(Array)

Found 4 duplicate lines in the following files:
  Between lines 45 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
  Between lines 32 and 35 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
  
  [Show duplicate lines source code]
              @owner[@reflection.primary_key_name], 
:conditions => conditions,
:include => @reflection.options[:include]
)

Found 4 duplicate lines in the following files:
  Between lines 145 and 148 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 62 and 65 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
  
  [Show duplicate lines source code]
            when @reflection.options[:as]
@finder_sql =
"#{@reflection.klass.table_name}.#{@reflection.options[:as]}_id = #{@owner.quoted_id} AND " +
"#{@reflection.klass.table_name}.#{@reflection.options[:as]}_type = #{@owner.class.quote_value(@owner.class.base_class.name.to_s)}"

Found 4 duplicate lines in the following files:
  Between lines 64 and 73 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  Between lines 140 and 153 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  
  [Show duplicate lines source code]
        master_helper_module.module_eval(&block) if block_given?
end

# Declare a controller method as a helper. For example, the following
# makes the +current_user+ controller method available to the view:
# class ApplicationController < ActionController::Base
# helper_method :current_user
# def current_user
# @current_user ||= User.find(session[:user])
# end
# end
def helper_method(*methods)
methods.flatten.each do |method|
master_helper_module.module_eval <<-end_eval

Found 4 duplicate lines in the following files:
  Between lines 62 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/response.rb
  Between lines 59 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/response.rb
  
  [Show duplicate lines source code]
        if content_type = headers.delete("Content-Type")
self.headers["type"] = content_type
end
if content_type = headers.delete("Content-type")
self.headers["type"] = content_type

Found 4 duplicate lines in the following files:
  Between lines 274 and 277 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  Between lines 104 and 107 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
  
  [Show duplicate lines source code]
          :text        => { :name => "text" },
:integer => { :name => "integer" },
:float => { :name => "float" },
:decimal => { :name => "decimal" },

Found 4 duplicate lines in the following files:
  Between lines 45 and 50 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  Between lines 66 and 71 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  Between lines 160 and 165 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  
  [Show duplicate lines source code]
        alias :midnight :beginning_of_day
alias :at_midnight :beginning_of_day
alias :at_beginning_of_day :beginning_of_day

# Returns a new Time representing the end of the day (23:59:59)
def end_of_day

Found 4 duplicate lines in the following files:
  Between lines 474 and 477 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  Between lines 504 and 507 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  
  [Show duplicate lines source code]
        if options.has_key?("checked")
cv = options.delete "checked"
checked = cv == true || cv == "checked"
else

Found 4 duplicate lines in the following files:
  Between lines 125 and 128 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
  Between lines 270 and 273 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
  
  [Show duplicate lines source code]
      e = encoding(nil)
if e and not /\A(?:7bit|8bit|binary)\z/i === e
raise ArgumentError,
'using C.T.Encoding with multipart mail is not permitted'

Found 4 duplicate lines in the following files:
  Between lines 87 and 90 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  Between lines 95 and 98 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  
  [Show duplicate lines source code]
        quoted_without_iso2022,
domlit_without_iso2022,
comment_without_iso2022
]

Found 4 duplicate lines in the following files:
  Between lines 141 and 146 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  Between lines 147 and 152 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  
  [Show duplicate lines source code]
        alias :monday :beginning_of_week
alias :at_beginning_of_week :beginning_of_week

# Returns a new Time representing the start of the given day in next week (default is Monday).
def next_week(day = :monday)
days_into_week = { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6}

Found 4 duplicate lines in the following files:
  Between lines 17 and 22 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
  Between lines 9 and 15 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
  
  [Show duplicate lines source code]
            alias_method :to_s, :to_formatted_s
alias_method :default_inspect, :inspect
alias_method :inspect, :readable_inspect

# Ruby 1.9 has DateTime#to_time which internally relies on Time. We define our own #to_time which allows
# DateTimes outside the range of what can be created with Time.
remove_method :to_time if base.instance_methods.include?(:to_time)

Found 4 duplicate lines in the following files:
  Between lines 804 and 809 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 824 and 829 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
                if association.new_record?
association.save(true)
end

if association.updated?
self["#{reflection.primary_key_name}"] = association.id

Found 4 duplicate lines in the following files:
  Between lines 893 and 896 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 924 and 927 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
'via',
'with',
'id',
'for',

Found 4 duplicate lines in the following files:
  Between lines 60 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb
  Between lines 78 and 84 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/builder-2.1.2/blankslate.rb
  
  [Show duplicate lines source code]
  class << self
alias_method :blank_slate_method_added, :method_added

# Detect method additions to Object and remove them in the
# BlankSlate class.
def method_added(name)
result = blank_slate_method_added(name)

Found 4 duplicate lines in the following files:
  Between lines 108 and 113 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 275 and 280 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  
  [Show duplicate lines source code]
        def has_cached_counter?
@owner.attribute_present?(cached_counter_attribute_name)
end

def cached_counter_attribute_name
"#{@reflection.name}_count"

Found 4 duplicate lines in the following files:
  Between lines 119 and 122 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 168 and 171 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 226 and 229 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 321 and 324 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
      action_table, action_check, action_default, action_pointer,
goto_table, goto_check, goto_default, goto_pointer,
nt_base, reduce_table, token_table, shift_n,
reduce_n, use_result, * = arg

Found 4 duplicate lines in the following files:
  Between lines 91 and 95 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  Between lines 185 and 190 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  
  [Show duplicate lines source code]
        def inherited_with_helper(child)
inherited_without_helper(child)

begin
child.master_helper_module = Module.new
child.master_helper_module.send! :include, master_helper_module

Found 4 duplicate lines in the following files:
  Between lines 489 and 492 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/dependencies.rb
  Between lines 496 and 499 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/dependencies.rb
  
  [Show duplicate lines source code]
    Dependencies.new_constants_in(Object) { super(file, *extras) }
rescue Exception => exception # errors from required file
exception.blame_file! file
raise

Found 4 duplicate lines in the following files:
  Between lines 586 and 589 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 618 and 621 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  
  [Show duplicate lines source code]
    def parse!(args)
options.parse!(args)
count = 0
args.each do |uri|

Found 4 duplicate lines in the following files:
  Between lines 11 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/mongrel.rb
  Between lines 5 and 8 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/servers/webrick.rb
  
  [Show duplicate lines source code]
OPTIONS = {
:port => 3000,
:ip => "0.0.0.0",
:environment => (ENV['RAILS_ENV'] || "development").dup,

Found 4 duplicate lines in the following files:
  Between lines 1177 and 1181 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  Between lines 1215 and 1219 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations.rb
  
  [Show duplicate lines source code]
            :before_add, :after_add, :before_remove, :after_remove, 
:extend
)

options[:extend] = create_extension_modules(association_id, extension, options[:extend]) if block_given?

Found 4 duplicate lines in the following files:
  Between lines 140 and 143 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 244 and 247 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  
  [Show duplicate lines source code]
        def construct_sql
case
when @reflection.options[:finder_sql]
@finder_sql = interpolate_sql(@reflection.options[:finder_sql])

Found 4 duplicate lines in the following files:
  Between lines 4 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  Between lines 4 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  
  [Show duplicate lines source code]
      def initialize(owner, reflection)
super
construct_sql
end

def build(attributes = {})

Found 4 duplicate lines in the following files:
  Between lines 170 and 173 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
  Between lines 1004 and 1007 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
  
  [Show duplicate lines source code]
    if @options.has_key?('cache')
@options['cache'].each { |scheme|
case(scheme)
when 'storable'

Found 4 duplicate lines in the following files:
  Between lines 99 and 102 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
  Between lines 18 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/server.rb
  
  [Show duplicate lines source code]
    ARGV.shift
else
if defined?(Mongrel)
"mongrel"

Found 4 duplicate lines in the following files:
  Between lines 231 and 234 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb
  Between lines 285 and 288 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 604 and 607 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  
  [Show duplicate lines source code]
        if first
first = false
else
strategy.meta ','

Found 4 duplicate lines in the following files:
  Between lines 750 and 756 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  Between lines 782 and 788 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  
  [Show duplicate lines source code]
        configuration.update(attr_names.extract_options!)

enum = configuration[:in] || configuration[:within]

raise(ArgumentError, "An object with the method include? is required must be supplied as the :in option of the configuration hash") unless enum.respond_to?("include?")

validates_each(attr_names, configuration) do |record, attr_name, value|

Found 4 duplicate lines in the following files:
  Between lines 196 and 200 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 209 and 213 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
                   act = action_table[i] and
action_check[i] == @racc_state[-1]
act = action_default[@racc_state[-1]]
end
while act = _racc_evalact(act, arg)

Found 4 duplicate lines in the following files:
  Between lines 83 and 87 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
  Between lines 114 and 118 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/javascript_helper.rb
  
  [Show duplicate lines source code]
        html_options = args.extract_options!
function = args[0] || ''

html_options.symbolize_keys!
function = update_page(&block) if block_given?

Found 4 duplicate lines in the following files:
  Between lines 72 and 75 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
  Between lines 172 and 175 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/net.rb
  
  [Show duplicate lines source code]
    NOSEND_FIELDS = %w(
received
bcc
)

Found 4 duplicate lines in the following files:
  Between lines 710 and 714 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
  Between lines 742 and 746 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/filters.rb
  
  [Show duplicate lines source code]
        while chain[index]
filter, index = skip_excluded_filters(chain, index)
break unless filter # end of call chain reached

case filter.type

Found 5 duplicate lines in the following files:
  Between lines 833 and 839 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 811 and 817 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 776 and 782 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 604 and 610 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 574 and 580 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  Between lines 547 and 553 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/plugin.rb
  
  [Show duplicate lines source code]
    def initialize(base_command)
@base_command = base_command
end

def options
OptionParser.new do |o|
o.set_summary_indent(' ')

Found 5 duplicate lines in the following files:
  Between lines 160 and 166 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 66 and 72 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  
  [Show duplicate lines source code]
        alias :midnight :beginning_of_day
alias :at_midnight :beginning_of_day
alias :at_beginning_of_day :beginning_of_day

# Returns a new DateTime representing the end of the day (23:59:59)
def end_of_day
change(:hour => 23, :min => 59, :sec => 59)

Found 5 duplicate lines in the following files:
  Between lines 1325 and 1331 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 1309 and 1315 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
                  val[1].times do
val[0].push ''
end
val[0].push val[2]
val[0]
end
.,.,

Found 5 duplicate lines in the following files:
  Between lines 15 and 38 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
  Between lines 10 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/range/conversions.rb
  Between lines 41 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/array/conversions.rb
  
  [Show duplicate lines source code]
        def self.included(base) #:nodoc:
base.class_eval do
alias_method :to_default_s, :to_s
alias_method :to_s, :to_formatted_s
end
end

def to_formatted_s(format = :default)

Found 5 duplicate lines in the following files:
  Between lines 60 and 66 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/http_mock.rb
  Between lines 50 and 56 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/http_mock.rb
  
  [Show duplicate lines source code]
      module_eval <<-EOE
def #{method}(path, body, headers)
request = ActiveResource::Request.new(:#{method}, path, body, headers)
self.class.requests << request
self.class.responses[request] || raise(InvalidRequestError.new("No response recorded for: \#{request.inspect}"))
end
EOE

Found 5 duplicate lines in the following files:
  Between lines 458 and 464 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  Between lines 303 and 311 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  
  [Show duplicate lines source code]
            in_scope, @selected = @selected, matches
yield matches
ensure
@selected = in_scope
end
end

# Returns all matches elements.
matches

Found 5 duplicate lines in the following files:
  Between lines 36 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/conversions.rb
  Between lines 40 and 45 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
  Between lines 46 and 51 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
  
  [Show duplicate lines source code]
            if formatter.respond_to?(:call)
formatter.call(self).to_s
else
strftime(formatter)
end
else

Found 5 duplicate lines in the following files:
  Between lines 10 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 10 and 18 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  
  [Show duplicate lines source code]
            alias_method :plus_without_duration, :+
alias_method :+, :plus_with_duration

alias_method :minus_without_duration, :-
alias_method :-, :minus_with_duration
end
end

module ClassMethods

Found 5 duplicate lines in the following files:
  Between lines 56 and 62 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 52 and 58 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  
  [Show duplicate lines source code]
          if options[:order] && @reflection.options[:order]
options[:order] = "#{options[:order]}, #{@reflection.options[:order]}"
elsif @reflection.options[:order]
options[:order] = @reflection.options[:order]
end

merge_options_from_reflection!(options)

Found 5 duplicate lines in the following files:
  Between lines 182 and 191 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 162 and 171 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  
  [Show duplicate lines source code]
        alias :at_end_of_month :end_of_month

# Returns a new Date/DateTime representing the start of the quarter (1st of january, april, july, october; DateTime objects will have time set to 0:00)
def beginning_of_quarter
beginning_of_month.change(:month => [10, 7, 4, 1].detect { |m| m <= self.month })
end
alias :at_beginning_of_quarter :beginning_of_quarter

# Returns a new Date/DateTime representing the start of the year (1st of january; DateTime objects will have time set to 0:00)
def beginning_of_year

Found 5 duplicate lines in the following files:
  Between lines 231 and 236 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  Between lines 164 and 170 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  
  [Show duplicate lines source code]
        raise ArgumentError, "Missing block" unless block_given?

options = args.extract_options!

case record_or_name_or_array
when String, Symbol
object_name = record_or_name_or_array

Found 5 duplicate lines in the following files:
  Between lines 383 and 387 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  Between lines 371 and 375 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb
  
  [Show duplicate lines source code]
        html_options = html_options.stringify_keys
add_default_name_and_id(html_options)
value = value(object)
content_tag("select",
add_options(

Found 5 duplicate lines in the following files:
  Between lines 322 and 326 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 301 and 305 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 282 and 286 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  
  [Show duplicate lines source code]
              if first && !subset.empty?
matches << subset.first
break
else
matches.concat subset

Found 5 duplicate lines in the following files:
  Between lines 232 and 238 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb
  Between lines 152 and 158 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/encode.rb
  
  [Show duplicate lines source code]
    def puts( str = nil )
@f << str if str
@f << @eol
end

def write( str )
@f << str

Found 5 duplicate lines in the following files:
  Between lines 198 and 206 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
  Between lines 88 and 96 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/session/active_record_store.rb
  
  [Show duplicate lines source code]
              CREATE TABLE #{table_name} (
id INTEGER PRIMARY KEY,
#{connection.quote_column_name('session_id')} TEXT UNIQUE,
#{connection.quote_column_name(@@data_column_name)} TEXT(255)
)
end_sql
end

def drop_table!

Found 5 duplicate lines in the following files:
  Between lines 285 and 289 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 231 and 236 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/address.rb
  
  [Show duplicate lines source code]
        if first
first = false
else
strategy.meta ','
end
strategy.space

Found 5 duplicate lines in the following files:
  Between lines 14 and 21 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
  Between lines 13 and 20 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
  
  [Show duplicate lines source code]
  alias_method  :controller_table_name, :controller_plural_name

def initialize(runtime_args, runtime_options = {})
super

@controller_name = @name.pluralize

base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name)

Found 5 duplicate lines in the following files:
  Between lines 131 and 135 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  Between lines 160 and 164 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb
  
  [Show duplicate lines source code]
        def method_missing(method, *args, &block)
if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method))
super
else
@reflection.klass.send(:with_scope, construct_scope) { @reflection.klass.send(method, *args, &block) }

Found 5 duplicate lines in the following files:
  Between lines 110 and 114 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  Between lines 40 and 44 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  
  [Show duplicate lines source code]
      def helper(*args, &block)
args.flatten.each do |arg|
case arg
when Module
add_template_helper(arg)

Found 5 duplicate lines in the following files:
  Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails/version.rb
  Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/version.rb
  Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/version.rb
  Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/version.rb
  Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_pack/version.rb
  Between lines 2 and 7 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/version.rb
  
  [Show duplicate lines source code]
  module VERSION #:nodoc:
MAJOR = 2
MINOR = 0
TINY = 2

STRING = [MAJOR, MINOR, TINY].join('.')

Found 5 duplicate lines in the following files:
  Between lines 629 and 633 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 628 and 632 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
 1, 78, :_reduce_none,
1, 78, :_reduce_none,
1, 78, :_reduce_none,
1, 78, :_reduce_none,
1, 78, :_reduce_none,

Found 5 duplicate lines in the following files:
  Between lines 5 and 16 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/server.rb
  Between lines 86 and 97 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
  
  [Show duplicate lines source code]
  require_library_or_gem 'fcgi'
rescue Exception
# FCGI not available
end

begin
require_library_or_gem 'mongrel'
rescue Exception
# Mongrel not available
end

server = case ARGV.first

Found 5 duplicate lines in the following files:
  Between lines 168 and 173 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 119 and 124 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
      action_table, action_check, action_default, action_pointer,
goto_table, goto_check, goto_default, goto_pointer,
nt_base, reduce_table, token_table, shift_n,
reduce_n, use_result, * = arg

_racc_init_sysvars

Found 5 duplicate lines in the following files:
  Between lines 413 and 419 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
  Between lines 396 and 402 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/resources.rb
  
  [Show duplicate lines source code]
          map_new_actions(map, resource)
map_member_actions(map, resource)

map_associations(resource, options)

if block_given?
with_options(:path_prefix => resource.nesting_path_prefix, :name_prefix => resource.nesting_name_prefix, :namespace => options[:namespace], &block)

Found 5 duplicate lines in the following files:
  Between lines 13 and 18 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
  Between lines 76 and 81 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  
  [Show duplicate lines source code]
      password = config[:password].to_s

if config.has_key?(:database)
database = config[:database]
else
raise ArgumentError, "No database specified. Missing argument: database."

Found 6 duplicate lines in the following files:
  Between lines 45 and 52 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  Between lines 117 and 124 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  
  [Show duplicate lines source code]
            when String, Symbol
file_name = arg.to_s.underscore + '_helper'
class_name = file_name.camelize

begin
require_dependency(file_name)
rescue LoadError => load_error
requiree = / -- (.*?)(\.rb)?$/.match(load_error.message).to_a[1]

Found 6 duplicate lines in the following files:
  Between lines 22 and 27 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/cgi_ext/session.rb
  Between lines 29 and 34 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
  
  [Show duplicate lines source code]
    md5 = Digest::MD5.new
now = Time.now
md5 << now.to_s
md5 << String(now.usec)
md5 << String(rand(0))
md5 << String($$)

Found 6 duplicate lines in the following files:
  Between lines 291 and 298 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 351 and 356 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  
  [Show duplicate lines source code]
      a.accept strategy
@comments.each do |c|
strategy.space
strategy.meta '('
strategy.text c
strategy.meta ')'

Found 6 duplicate lines in the following files:
  Between lines 365 and 372 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 505 and 512 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  
  [Show duplicate lines source code]
    def id
ensure_parsed
@id
end

def id=( arg )
ensure_parsed
@id = arg

Found 6 duplicate lines in the following files:
  Between lines 29 and 34 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
  Between lines 64 and 69 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  
  [Show duplicate lines source code]
            options[:year]  || self.year,
options[:month] || self.month,
options[:day] || self.day,
options[:hour] || self.hour,
options[:min] || (options[:hour] ? 0 : self.min),
options[:sec] || ((options[:hour] || options[:min]) ? 0 : self.sec),

Found 6 duplicate lines in the following files:
  Between lines 282 and 290 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  Between lines 301 and 309 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
  
  [Show duplicate lines source code]
              if first && !subset.empty?
matches << subset.first
break
else
matches.concat subset
end
end
end
matches.empty? ? nil : matches

Found 6 duplicate lines in the following files:
  Between lines 192 and 202 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  Between lines 178 and 200 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/validations.rb
  
  [Show duplicate lines source code]
    def clear
@errors = {}
end

# Returns the total number of errors added. Two errors added to the same attribute will be counted as such
# with this as well.
#
# ==== Examples
# my_person = Person.new(params[:person])
# my_person.errors.size
# # => 0
#
# my_person.errors.add('login', 'can not be empty') if my_person.login == ''
# my_person.errors.add('password', 'can not be empty') if my_person.password == ''
# my_person.error.size
# # => 2
#
def size
@errors.values.inject(0) { |error_count, attribute| error_count + attribute.size }
end

alias_method :count, :size
alias_method :length, :size

Found 6 duplicate lines in the following files:
  Between lines 760 and 766 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
  Between lines 800 and 806 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb
  
  [Show duplicate lines source code]
          first = rest = nil

if ((@split_rules & SPLIT_HYPHENATION) != 0)
if @hyphenator_arity == 2
first, rest = @hyphenator.hyphenate_to(word, size)
else
first, rest = @hyphenator.hyphenate_to(word, size, self)

Found 6 duplicate lines in the following files:
  Between lines 31 and 43 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
  Between lines 15 and 27 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
  
  [Show duplicate lines source code]
          @updated = true
end

loaded
record
end

def updated?
@updated
end

private
def find_target

Found 6 duplicate lines in the following files:
  Between lines 140 and 147 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  Between lines 192 and 198 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/parser.rb
  
  [Show duplicate lines source code]
          @racc_read_next = false

i += @racc_t
unless i >= 0 and
act = action_table[i] and
action_check[i] == @racc_state[-1]
act = action_default[@racc_state[-1]]

Found 6 duplicate lines in the following files:
  Between lines 355 and 360 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  Between lines 1007 and 1012 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  
  [Show duplicate lines source code]
          else
raise(
ActiveRecordError,
"Validations need to be either a symbol, string (to be eval'ed), proc/method, or " +
"class implementing a static validation method"
)

Found 7 duplicate lines in the following files:
  Between lines 2 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
  Between lines 2 and 9 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
  
  [Show duplicate lines source code]
  default_options :skip_timestamps => false, :skip_migration => false

attr_reader :controller_name,
:controller_class_path,
:controller_file_path,
:controller_class_nesting,
:controller_class_nesting_depth,
:controller_class_name,

Found 7 duplicate lines in the following files:
  Between lines 525 and 537 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 228 and 240 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  
  [Show duplicate lines source code]
    def date
ensure_parsed
@date
end

def date=( arg )
ensure_parsed
@date = arg
end

private

def init

Found 7 duplicate lines in the following files:
  Between lines 195 and 206 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  Between lines 72 and 79 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  
  [Show duplicate lines source code]
        arg = args.shift

if arg.is_a?(HTML::Node)
root = arg
arg = args.shift
elsif arg == nil
raise ArgumentError, "First argument is either selector or element to select, but nil found. Perhaps you called assert_select with an element that does not exist?"
elsif @selected

Found 7 duplicate lines in the following files:
  Between lines 315 and 322 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/db2.rb
  Between lines 297 and 304 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/vendor/db2.rb
  
  [Show duplicate lines source code]
      cols = get_col_desc
rc = SQLFetch(@handle)
if rc == SQL_NO_DATA_FOUND
SQLFreeStmt(@handle, SQL_CLOSE) # Close cursor
SQLFreeStmt(@handle, SQL_RESET_PARAMS) # Reset parameters
return nil
end
raise "ERROR" unless rc == SQL_SUCCESS

Found 7 duplicate lines in the following files:
  Between lines 6 and 17 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/helpers.rb
  Between lines 3 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/helpers.rb
  
  [Show duplicate lines source code]
    def self.included(base) #:nodoc:
# Initialize the base module to aggregate its helpers.
base.class_inheritable_accessor :master_helper_module
base.master_helper_module = Module.new

# Extend base with class methods to declare helpers.
base.extend(ClassMethods)

base.class_eval do
# Wrap inherited to create a new master helper module for subclasses.
class << self
alias_method_chain :inherited, :helper

Found 7 duplicate lines in the following files:
  Between lines 76 and 82 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
  Between lines 62 and 68 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
  Between lines 35 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
  
  [Show duplicate lines source code]
    def add_options!(opt)
opt.separator ''
opt.separator 'Options:'
opt.on("--skip-timestamps",
"Don't add timestamps to the migration file for this model") { |v| options[:skip_timestamps] = v }
opt.on("--skip-migration",
"Don't generate a migration file for this model") { |v| options[:skip_migration] = v }

Found 7 duplicate lines in the following files:
  Between lines 130 and 139 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb
  Between lines 148 and 157 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb
  
  [Show duplicate lines source code]
        def recognized_request_for(path, request_method = nil)
path = "/#{path}" unless path.first == '/'

# Assume given controller
request = ActionController::TestRequest.new({}, {}, nil)
request.env["REQUEST_METHOD"] = request_method.to_s.upcase if request_method
request.path = path

ActionController::Routing::Routes.recognize(request)
request

Found 7 duplicate lines in the following files:
  Between lines 76 and 82 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  Between lines 68 and 74 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/scanner_r.rb
  
  [Show duplicate lines source code]
      [
/\A(?:[#{atomchars}]+|#{iso2022str}|#{eucstr})+/n,
/\A(?:[#{tokenchars}]+|#{iso2022str}|#{eucstr})+/n,
quoted_with_iso2022,
domlit_with_iso2022,
comment_with_iso2022
]

Found 7 duplicate lines in the following files:
  Between lines 23 and 31 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/clean_logger.rb
  Between lines 22 and 30 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/buffered_logger.rb
  
  [Show duplicate lines source code]
      if silencer
begin
old_logger_level, self.level = level, temporary_level
yield self
ensure
self.level = old_logger_level
end
else
yield self

Found 7 duplicate lines in the following files:
  Between lines 206 and 215 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  Between lines 54 and 63 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  
  [Show duplicate lines source code]
        def plus_with_duration(other) #:nodoc:
if ActiveSupport::Duration === other
other.since(self)
else
plus_without_duration(other)
end
end

def minus_with_duration(other) #:nodoc:
if ActiveSupport::Duration === other

Found 8 duplicate lines in the following files:
  Between lines 26 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
  Between lines 26 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
  
  [Show duplicate lines source code]
      class_eval(<<-EOS, __FILE__, __LINE__)
unless defined? @@#{sym}
@@#{sym} = nil
end

def self.#{sym}=(obj)
@@#{sym} = obj
end

#{"
def #{sym}=(obj)
@@#{sym} = obj
end
" unless options[:instance_writer] == false }

EOS

Found 8 duplicate lines in the following files:
  Between lines 44 and 58 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
  Between lines 57 and 72 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
  
  [Show duplicate lines source code]
      m.dependency 'model', [name] + @args, :collision => :skip

m.template(
'controller.rb', File.join('app/controllers', controller_class_path, "#{controller_file_name}_controller.rb")
)

m.template('functional_test.rb', File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb"))
m.template('helper.rb', File.join('app/helpers', controller_class_path, "#{controller_file_name}_helper.rb"))

m.route_resources controller_file_name
end
end

protected
# Override with your own usage banner.
def banner

Found 8 duplicate lines in the following files:
  Between lines 39 and 51 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
  Between lines 180 and 192 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/stringio.rb
  
  [Show duplicate lines source code]
      if block_given?
begin
f = super
yield f
ensure
f.close if f
end
else
super
end
end

alias open new

Found 8 duplicate lines in the following files:
  Between lines 50 and 59 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 14 and 23 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  
  [Show duplicate lines source code]
        conditions = "#{@finder_sql}"
if sanitized_conditions = sanitize_sql(options[:conditions])
conditions << " AND (#{sanitized_conditions})"
end
options[:conditions] = conditions

if options[:order] && @reflection.options[:order]
options[:order] = "#{options[:order]}, #{@reflection.options[:order]}"
elsif @reflection.options[:order]
options[:order] = @reflection.options[:order]

Found 8 duplicate lines in the following files:
  Between lines 6 and 19 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb
  Between lines 6 and 19 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb
  
  [Show duplicate lines source code]
      next if sym.is_a?(Hash)
class_eval(<<-EOS, __FILE__, __LINE__)
unless defined? @@#{sym}
@@#{sym} = nil
end

def self.#{sym}
@@#{sym}
end

def #{sym}
@@#{sym}
end
EOS

Found 8 duplicate lines in the following files:
  Between lines 44 and 52 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/conversions.rb
  Between lines 38 and 46 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/conversions.rb
  
  [Show duplicate lines source code]
        def to_formatted_s(format = :default)
if formatter = DATE_FORMATS[format]
if formatter.respond_to?(:call)
formatter.call(self).to_s
else
strftime(formatter)
end
else
to_default_s

Found 9 duplicate lines in the following files:
  Between lines 44 and 54 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  Between lines 36 and 48 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
  
  [Show duplicate lines source code]
            record = load_target.detect { |record| id == record.id }
expects_array ? [record] : record
else
load_target.select { |record| ids.include?(record.id) }
end
else
conditions = "#{@finder_sql}"

if sanitized_conditions = sanitize_sql(options[:conditions])
conditions << " AND (#{sanitized_conditions})"
end

options[:conditions] = conditions

Found 9 duplicate lines in the following files:
  Between lines 3 and 11 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spinner.rb
  Between lines 6 and 14 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/commands/process/spawner.rb
  Between lines 4 and 12 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/kernel/daemonizing.rb
  
  [Show duplicate lines source code]
  def daemonize
exit if fork # Parent exits, child continues.
Process.setsid # Become session leader.
exit if fork # Zap session leader. See [1].
Dir.chdir "/" # Release old working directory.
File.umask 0000 # Ensure sensible umask. Adjust as needed.
STDIN.reopen "/dev/null" # Free file descriptors and
STDOUT.reopen "/dev/null", "a" # point them somewhere sensible.
STDERR.reopen STDOUT # STDOUT/ERR should better go to a logfile.

Found 9 duplicate lines in the following files:
  Between lines 249 and 260 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
  Between lines 152 and 163 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
  
  [Show duplicate lines source code]
              @finder_sql = "#{@reflection.klass.table_name}.#{@reflection.primary_key_name} = #{@owner.quoted_id}"
@finder_sql << " AND (#{conditions})" if conditions
end

if @reflection.options[:counter_sql]
@counter_sql = interpolate_sql(@reflection.options[:counter_sql])
elsif @reflection.options[:finder_sql]
# replace the SELECT clause with COUNT(*), preserving any hints within /* ... */
@reflection.options[:counter_sql] = @reflection.options[:finder_sql].sub(/SELECT (\/\*.*?\*\/ )?(.*)\bFROM\b/im) { "SELECT #{$1}COUNT(*) FROM" }
@counter_sql = interpolate_sql(@reflection.options[:counter_sql])
else
@counter_sql = @finder_sql

Found 10 duplicate lines in the following files:
  Between lines 90 and 101 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  Between lines 209 and 224 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb
  
  [Show duplicate lines source code]
        else
# Otherwise just operate on the response document.
root = response_from_page_or_rjs
end

# First or second argument is the selector: string and we pass
# all remaining arguments. Array and we pass the argument. Also
# accepts selector itself.
case arg
when String
selector = HTML::Selector.new(arg, args)
when Array
selector = HTML::Selector.new(*arg)
when HTML::Selector
selector = arg
else raise ArgumentError, "Expecting a selector as the first argument"

Found 11 duplicate lines in the following files:
  Between lines 166 and 177 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb
  Between lines 368 and 379 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb
  
  [Show duplicate lines source code]
        options = args.extract_options!

case record_or_name_or_array
when String, Symbol
object_name = record_or_name_or_array
when Array
object = record_or_name_or_array.last
object_name = ActionController::RecordIdentifier.singular_class_name(object)
apply_form_for_options!(record_or_name_or_array, options)
args.unshift object
else
object = record_or_name_or_array

Found 12 duplicate lines in the following files:
  Between lines 23 and 40 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
  Between lines 24 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
  
  [Show duplicate lines source code]
    if @controller_class_nesting.empty?
@controller_class_name = @controller_class_name_without_nesting
else
@controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}"
end
end

def manifest
record do |m|
# Check for class naming collisions.
m.class_collisions(controller_class_path, "#{controller_class_name}Controller", "#{controller_class_name}Helper")
m.class_collisions(class_path, "#{class_name}")

# Controller, helper, views, and test directories.
m.directory(File.join('app/models', class_path))
m.directory(File.join('app/controllers', controller_class_path))
m.directory(File.join('app/helpers', controller_class_path))
m.directory(File.join('app/views', controller_class_path, controller_file_name))

Found 13 duplicate lines in the following files:
  Between lines 1184 and 1200 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/base.rb
  Between lines 23 and 39 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionpack/lib/action_controller/benchmarking.rb
  
  [Show duplicate lines source code]
      def benchmark(title, log_level = Logger::DEBUG, use_silence = true)
if logger && logger.level == log_level
result = nil
seconds = Benchmark.realtime { result = use_silence ? silence { yield } : yield }
logger.add(log_level, "#{title} (#{'%.5f' % seconds})")
result
else
yield
end
end

# Silences the logger for the duration of the block.
def silence
old_logger_level, logger.level = logger.level, Logger::ERROR if logger
yield
ensure
logger.level = old_logger_level if logger

Found 13 duplicate lines in the following files:
  Between lines 848 and 870 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  Between lines 747 and 769 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/header.rb
  
  [Show duplicate lines source code]
    def params
ensure_parsed
unless @params.blank?
@params.each do |k, v|
@params[k] = unquote(v)
end
end
@params
end

def []( key )
ensure_parsed
@params and unquote(@params[key])
end

def []=( key, val )
ensure_parsed
(@params ||= {})[key] = val
end

private

def init

Found 15 duplicate lines in the following files:
  Between lines 14 and 41 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb
  Between lines 30 and 57 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/core_extensions.rb
  
  [Show duplicate lines source code]
  class NilClass #:nodoc:
def blank?
true
end
end

class FalseClass #:nodoc:
def blank?
true
end
end

class TrueClass #:nodoc:
def blank?
false
end
end

class Array #:nodoc:
alias_method :blank?, :empty?
end

class Hash #:nodoc:
alias_method :blank?, :empty?
end

class String #:nodoc:
def blank?

Found 18 duplicate lines in the following files:
  Between lines 96 and 137 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/date/calculations.rb
  Between lines 102 and 144 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activesupport/lib/active_support/core_ext/time/calculations.rb
  
  [Show duplicate lines source code]
        def months_ago(months)
advance(:months => -months)
end

# Returns a new Time representing the time a number of specified months in the future
def months_since(months)
advance(:months => months)
end

# Returns a new Time representing the time a number of specified years ago
def years_ago(years)
advance(:years => -years)
end

# Returns a new Time representing the time a number of specified years in the future
def years_since(years)
advance(:years => years)
end

# Short-hand for years_ago(1)
def last_year
years_ago(1)
end

# Short-hand for years_since(1)
def next_year
years_since(1)
end


# Short-hand for months_ago(1)
def last_month
months_ago(1)
end

# Short-hand for months_since(1)
def next_month
months_since(1)
end

# Returns a new Time representing the "start" of this week (Monday, 0:00)
def beginning_of_week
days_to_monday = self.wday!=0 ? self.wday-1 : 6

Found 21 duplicate lines in the following files:
  Between lines 67 and 170 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activeresource/lib/active_resource/validations.rb
  Between lines 96 and 178 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/activerecord/lib/active_record/validations.rb
  
  [Show duplicate lines source code]
    def invalid?(attribute)
!@errors[attribute.to_s].nil?
end

# Returns nil, if no errors are associated with the specified +attribute+.
# Returns the error message, if one error is associated with the specified +attribute+.
# Returns an array of error messages, if more than one error is associated with the specified +attribute+.
#
# class Company < ActiveRecord::Base
# validates_presence_of :name, :address, :email
# validates_length_of :name, :in => 5..30
# end
#
# company = Company.create(:address => '123 First St.')
# company.errors.on(:name) # => ["is too short (minimum is 5 characters)", "can't be blank"]
# company.errors.on(:email) # => "can't be blank"
# company.errors.on(:address) # => nil
def on(attribute)
errors = @errors[attribute.to_s]
return nil if errors.nil?
errors.size == 1 ? errors.first : errors
end

alias :[] :on

# Returns errors assigned to the base object through add_to_base according to the normal rules of on(attribute).
def on_base
on(:base)
end

# Yields each attribute and associated message per error added.
#
# class Company < ActiveRecord::Base
# validates_presence_of :name, :address, :email
# validates_length_of :name, :in => 5..30
# end
#
# company = Company.create(:address => '123 First St.')
# company.errors.each{|attr,msg| puts "#{attr} - #{msg}" } # =>
# name - is too short (minimum is 5 characters)
# name - can't be blank
# address - can't be blank
def each
@errors.each_key { |attr| @errors[attr].each { |msg| yield attr, msg } }
end

# Yields each full error message added. So Person.errors.add("first_name", "can't be empty") will be returned
# through iteration as "First name can't be empty".
#
# class Company < ActiveRecord::Base
# validates_presence_of :name, :address, :email
# validates_length_of :name, :in => 5..30
# end
#
# company = Company.create(:address => '123 First St.')
# company.errors.each_full{|msg| puts msg } # =>
# Name is too short (minimum is 5 characters)
# Name can't be blank
# Address can't be blank
def each_full
full_messages.each { |msg| yield msg }
end

# Returns all the full error messages in an array.
#
# class Company < ActiveRecord::Base
# validates_presence_of :name, :address, :email
# validates_length_of :name, :in => 5..30
# end
#
# company = Company.create(:address => '123 First St.')
# company.errors.full_messages # =>
# ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Address can't be blank"]
def full_messages
full_messages = []

@errors.each_key do |attr|
@errors[attr].each do |msg|
next if msg.nil?

if attr == "base"
full_messages << msg
else

Found 296 duplicate lines in the following files:
  Between lines 33 and 547 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/facade.rb
  Between lines 34 and 535 in /home/jeanmichel/ruby/projects/dry-report/rails_plugin/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.1.0/tmail/interface.rb
  
  [Show duplicate lines source code]
module TMail

class Mail

def header_string( name, default = nil )
h = @header[name.downcase] or return default
h.to_s
end

###
### attributes
###

include TextUtils

def set_string_array_attr( key, strs )
strs.flatten!
if strs.empty?
@header.delete key.downcase
else
store key, strs.join(', ')
end
strs
end
private :set_string_array_attr

def set_string_attr( key, str )
if str
store key, str
else
@header.delete key.downcase
end
str
end
private :set_string_attr

def set_addrfield( name, arg )
if arg
h = HeaderField.internal_new(name, @config)
h.addrs.replace [arg].flatten
@header[name] = h
else
@header.delete name
end
arg
end
private :set_addrfield

def addrs2specs( addrs )
return nil unless addrs
list = addrs.map {|addr|
if addr.address_group?
then addr.map {|a| a.spec }
else addr.spec
end
}.flatten
return nil if list.empty?
list
end
private :addrs2specs

#
# date time
#

def date( default = nil )
if h = @header['date']
h.date
else
default
end
end

def date=( time )
if time
store 'Date', time2str(time)
else
@header.delete 'date'
end
time
end

def strftime( fmt, default = nil )
if t = date
t.strftime(fmt)
else
default
end
end

#
# destination
#

def to_addrs( default = nil )
if h = @header['to']
h.addrs
else
default
end
end

def cc_addrs( default = nil )
if h = @header['cc']
h.addrs
else
default
end
end

def bcc_addrs( default = nil )
if h = @header['bcc']
h.addrs
else
default
end
end

def to_addrs=( arg )
set_addrfield 'to', arg
end

def cc_addrs=( arg )
set_addrfield 'cc', arg
end

def bcc_addrs=( arg )
set_addrfield 'bcc', arg
end

def to( default = nil )
addrs2specs(to_addrs(nil)) || default
end

def cc( default = nil )
addrs2specs(cc_addrs(nil)) || default
end

def bcc( default = nil )
addrs2specs(bcc_addrs(nil)) || default
end

def to=( *strs )
set_string_array_attr 'To', strs
end

def cc=( *strs )
set_string_array_attr 'Cc', strs
end

def bcc=( *strs )
set_string_array_attr 'Bcc', strs
end

#
# originator
#

def from_addrs( default = nil )
if h = @header['from']
h.addrs
else
default
end
end

def from_addrs=( arg )
set_addrfield 'from', arg
end

def from( default = nil )
addrs2specs(from_addrs(nil)) || default
end

def from=( *strs )
set_string_array_attr 'From', strs
end

def friendly_from( default = nil )
h = @header['from']
a, = h.addrs
return default unless a
return a.phrase if a.phrase
return h.comments.join(' ') unless h.comments.empty?
a.spec
end


def reply_to_addrs( default = nil )
if h = @header['reply-to']
h.addrs
else
default
end
end

def reply_to_addrs=( arg )
set_addrfield 'reply-to', arg
end

def reply_to( default = nil )
addrs2specs(reply_to_addrs(nil)) || default
end

def reply_to=( *strs )
set_string_array_attr 'Reply-To', strs
end


def sender_addr( default = nil )
f = @header['sender'] or return default
f.addr or return default
end

def sender_addr=( addr )
if addr
h = HeaderField.internal_new('sender', @config)
h.addr = addr
@header['sender'] = h
else
@header.delete 'sender'
end
addr
end

def sender( default )
f = @header['sender'] or return default
a = f.addr or return default
a.spec
end

def sender=( str )
set_string_attr 'Sender', str
end


#
# subject
#

def subject( default = nil )
if h = @header['subject']
h.body
else
default
end
end
alias quoted_subject subject

def subject=( str )
set_string_attr 'Subject', str
end

#
# identity & threading
#

def message_id( default = nil )
if h = @header['message-id']
h.id || default
else
default
end
end

def message_id=( str )
set_string_attr 'Message-Id', str
end

def in_reply_to( default = nil )
if h = @header['in-reply-to']
h.ids
else
default
end
end

def in_reply_to=( *idstrs )
set_string_array_attr 'In-Reply-To', idstrs
end

def references( default = nil )
if h = @header['references']
h.refs
else
default
end
end

def references=( *strs )
set_string_array_attr 'References', strs
end

#
# MIME headers
#

def mime_version( default = nil )
if h = @header['mime-version']
h.version || default
else
default
end
end

def mime_version=( m, opt = nil )
if opt
if h = @header['mime-version']
h.major = m
h.minor = opt
else
store 'Mime-Version', "#{m}.#{opt}"
end
else
store 'Mime-Version', m
end
m
end

def content_type( default = nil )
if h = @header['content-type']
h.content_type || default
else
default
end
end

def main_type( default = nil )
if h = @header['content-type']
h.main_type || default
else
default
end
end

def sub_type( default = nil )
if h = @header['content-type']
h.sub_type || default
else
default
end
end

def set_content_type( str, sub = nil, param = nil )
if sub
main, sub = str, sub
else
main, sub = str.split(%r</>, 2)
raise ArgumentError, "sub type missing: #{str.inspect}" unless sub
end
if h = @header['content-type']
h.main_type = main
h.sub_type = sub
h.params.clear
else
store 'Content-Type', "#{main}/#{sub}"
end
@header['content-type'].params.replace param if param
str
end

alias content_type= set_content_type

def type_param( name, default = nil )
if h = @header['content-type']
h[name] || default
else
default
end
end

def charset( default = nil )
if h = @header['content-type']
h['charset'] or default
else
default
end
end

def charset=( str )
if str
if h = @header[ 'content-type' ]
h['charset'] = str
else
store 'Content-Type', "text/plain; charset=#{str}"
end
end
str
end

def transfer_encoding( default = nil )
if h = @header['content-transfer-encoding']
h.encoding || default
else
default
end
end

def transfer_encoding=( str )
set_string_attr 'Content-Transfer-Encoding', str
end

alias encoding transfer_encoding
alias encoding= transfer_encoding=
alias content_transfer_encoding transfer_encoding
alias content_transfer_encoding= transfer_encoding=

def disposition( default = nil )
if h = @header['content-disposition']
h.disposition || default
else
default
end
end

alias content_disposition disposition

def set_disposition( str, params = nil )
if h = @header['content-disposition']
h.disposition = str
h.params.clear
else
store('Content-Disposition', str)
h = @header['content-disposition']
end
h.params.replace params if params
end

alias disposition= set_disposition
alias set_content_disposition set_disposition
alias content_disposition= set_disposition

def disposition_param( name, default = nil )
if h = @header['content-disposition']
h[name] || default
else
default
end
end

###
### utils
###

def create_reply
mail = TMail::Mail.parse('')
mail.subject = 'Re: ' + subject('').sub(/\A(?:\[[^\]]+\])?(?:\s*Re:)*\s*/i, '')
mail.to_addrs = reply_addresses([])
mail.in_reply_to = [message_id(nil)].compact
mail.references = references([]) + [message_id(nil)].compact
mail.mime_version = '1.0'
mail
end

def base64_encode
store 'Content-Transfer-Encoding', 'Base64'
self.body = Base64.folding_encode(self.body)
end

def base64_decode
if /base64/i === self.transfer_encoding('')
store 'Content-Transfer-Encoding', '8bit'
self.body = Base64.decode(self.body, @config.strict_base64decode?)
end
end

def destinations( default = nil )
ret = []
%w( to cc bcc ).each do |nm|
if h = @header[nm]
h.addrs.each {|i| ret.push i.address }
end
end
ret.empty? ? default : ret
end

def each_destination( &block )
destinations([]).each do |i|
if Address === i
yield i
else
i.each(&block)
end
end
end

alias each_dest each_destination

def reply_addresses( default = nil )
reply_to_addrs(nil) or from_addrs(nil) or default
end

def error_reply_addresses( default = nil )
if s = sender(nil)
[s]
else
from_addrs(default)
end
end

def multipart?
main_type('').downcase == 'multipart'