mbj / mutant

Automated code reviews via mutation testing - semantic code coverage.
Other
1.95k stars 153 forks source link

BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction! #225

Closed tjchambers closed 10 years ago

tjchambers commented 10 years ago

I am in a bind. I got 2 of these messages using 0.6.0 with the parallel processing. (which BTW is sweet!). However I was really just playing around with a small class I made when I first started Ruby coding, so it has very few tests and of course lots of alive mutants.

I can make a gist of it and the results (nothing proprietary except my pride - it is not very good ruby), or I can try and clean it up and get better coverage of the code and hope I don't lose the BUG.

What would the recommendation be?

tjchambers commented 10 years ago

I was able to isolate a few lines of code that still exhibit the bug when mutated:

  def process_entry(key, value)
    x = value.collect { |v| "[#{v.join(',')}]" }
    out = "#{prefix}a[#{key}]=[#{x.join(',')}];"
    2.times { out = out.sub(',[]];', '];') }
  end
tjchambers commented 10 years ago

here is a snippet of the output around the bug declaration.

evil:WebCache#process_entry:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:5:6e951
@@ -1,10 +1,6 @@
 def process_entry(key, value)
   x = value.collect do |v|
     "[#{v.join(",")}]"
   end
-  out = "#{prefix}a[#{key}]=[#{x.join(",")}];"
-  2.times do
-    out = out.sub(",[]];", "];")
-  end
 end
-----------------------
evil:WebCache#process_entry:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:5:5b284
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!
-----------------------
evil:WebCache#process_entry:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:5:62c0d
@@ -1,10 +1,6 @@
 def process_entry(key, value)
-  x = value.collect do |v|
-    "[#{v.join(",")}]"
-  end
-  out = "#{prefix}a[#{key}]=[#{x.join(",")}];"
   2.times do
     out = out.sub(",[]];", "];")
   end
 end
mbj commented 10 years ago

@tjchambers Thx for that reproduction. I think its enough to fix the problem.

Too give the situation a bit of a context, and let my brain think while serializing:

Mutant is supposed to do a single change to the code. First level mutants. At least at this point of mutant development. Adding support for higher level mutants is easy and I'll probably add knobs for this soon. There are reasons I decided against them that do not fit this comment.

The way I wrote unparser / the mutation operators should result in a single continuous hunk (term from the diff-lcs algorithm). In case such a single hunk cannot be found for a mutation either one of the following is true:

I added a detection for those cases via asserting the number of hunks and found some bugs with it. This issue reminds me to increase the verbosity of the message. Rendering the original source, and the mutated source next to each other (and not diffing them) is the way to go here.

tjchambers commented 10 years ago

Thanks @mbj, for the details.

I will of course have to re-read what you wrote and do some research to fully grok it. Please let me know if I can provide any further assistance to the bug-reduction cause.

mbj commented 10 years ago

@tjchambers As we have more verbose reporting of these in master now. Can you repost your instance?

tjchambers commented 10 years ago

I updated my gems and ran into a snag - parallel 1.2.0 got updated and now I am getting a broken pipe error from mutant. So I need to examine that :(

mbj commented 10 years ago

parallel normally lifts the exceptions from workers to the master process. This seems to be broken by 1.2.0. Are you sure you are using a recent version of mutants master branch? I fixed a bunch of crashing killforks already.

tjchambers commented 10 years ago

I dropped my gemfile.lock and updated mutant. But given my level of expertise I need to confirm that since I still show working with -0.6.0. So I can said I 'tried" to get the latest master.

mbj commented 10 years ago

@tjchambers can you post your bundle show mutant ?

tjchambers commented 10 years ago

/Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27

mbj commented 10 years ago

@tjchambers BTW I now know why we had these diff errors. Its valid. I need to support diffs with multiple hunks. Its a; b; c; to b. A valid mutation.

mbj commented 10 years ago

@tjchambers I can confirm that your version of mutant equals HEAD of the master branch.

tjchambers commented 10 years ago

Here is the first error:

/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/freezer.rb:101:in `block in guarded_deep_freeze': undefined method `guarded_deep_freeze' for nil:NilClass (NoMethodError)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/support/recursion_guard.rb:51:in `guard'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/freezer.rb:100:in `guarded_deep_freeze'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/freezer.rb:55:in `deep_freeze!'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine.rb:59:in `deep_freeze!'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/freezer.rb:83:in `freeze'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/abstract_type-0.0.7/lib/abstract_type.rb:37:in `block in create_new_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/abstract_type-0.0.7/lib/abstract_type.rb:37:in `block in create_new_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:150:in `block in expressions'
mbj commented 10 years ago

Can you get me a longer stack trace?

tjchambers commented 10 years ago
RAILS_ENV=test bundle exec mutant -r./config/environment.rb -Iapp/helpers -rweb_cache.rb --use rspec WebCache
Mutant configuration:
Matcher:            #<Mutant::Matcher::Config match_expressions=[<Mutant::Expression: WebCache>] subject_ignores=[] subject_selects=[]>
Integration:        rspec
Expect Coverage:    100.00%
Processes:          8
Includes:           ["app/helpers"]
Requires:           ["./config/environment.rb", "web_cache.rb"]
.FF.FFF/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write': Broken pipe (Errno::EPIPE)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write': Broken pipe (Errno::EPIPE)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write'/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write': : Broken pipeBroken pipe ( (Errno::EPIPEErrno::EPIPE)
)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/libcf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write': Broken pipe (Errno::EPIPE)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write': Broken pipe (Errno::EPIPE)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `write': Broken pipe (Errno::EPIPE)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `dump'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:332:in `process_incoming_jobs'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:311:in `block in worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `fork'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:304:in `worker'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:292:in `block in create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:291:in `create_workers'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:248:in `work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:120:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:47:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:23:in `initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/env.rb:40:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `public_send'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/procto-0.0.2/lib/procto.rb:62:in `block in initialize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/cli.rb:25:in `run'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/bin/mutant:18:in `<top (required)>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `load'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/mutant:23:in `<main>'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in `<main>'
/Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/freezer.rb:101:in `block in guarded_deep_freeze': undefined method `guarded_deep_freeze' for nil:NilClass (NoMethodError)
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/support/recursion_guard.rb:51:in `guard'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/freezer.rb:100:in `guarded_deep_freeze'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine/freezer.rb:55:in `deep_freeze!'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/ice_nine-0.11.0/lib/ice_nine.rb:59:in `deep_freeze!'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/freezer.rb:83:in `freeze'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/adamantium-0.2.0/lib/adamantium/class_methods.rb:17:in `new'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/abstract_type-0.0.7/lib/abstract_type.rb:37:in `block in create_new_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/abstract_type-0.0.7/lib/abstract_type.rb:37:in `block in create_new_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:150:in `block in expressions'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:147:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:147:in `each_with_object'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:147:in `expressions'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:124:in `try_parse'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/expression.rb:108:in `parse'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/context/scope.rb:100:in `block in match_expressions'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/context/scope.rb:99:in `reverse_each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/context/scope.rb:99:in `each'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/context/scope.rb:99:in `map'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/context/scope.rb:99:in `match_expressions'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `call'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `block (3 levels) in create_memoized_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:63:in `block (3 levels) in fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:58:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:62:in `block (2 levels) in fetch'
    from /Users/tj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:61:in `block in fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:58:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:60:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:116:in `block (2 levels) in create_memoized_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/subject.rb:122:in `match_expressions'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `call'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `block (3 levels) in create_memoized_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:63:in `block (3 levels) in fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:58:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:62:in `block (2 levels) in fetch'
    from /Users/tj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:61:in `block in fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:58:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:60:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:116:in `block (2 levels) in create_memoized_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/subject.rb:42:in `tests'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `call'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `block (3 levels) in create_memoized_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:63:in `block (3 levels) in fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:58:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:62:in `block (2 levels) in fetch'
    from /Users/tj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:61:in `block in fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:58:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/memory.rb:60:in `fetch'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:116:in `block (2 levels) in create_memoized_method'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/bundler/gems/mutant-cf1c9a2bed27/lib/mutant/runner.rb:84:in `finish'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:432:in `call'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:432:in `with_instrumentation'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:263:in `block (3 levels) in work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:258:in `loop'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:258:in `block (2 levels) in work_in_processes'
    from /Users/tj/.rvm/gems/ruby-2.1.2@global/gems/parallel-1.2.0/lib/parallel.rb:71:in `block (2 levels) in in_threads'
mbj commented 10 years ago

@tjchambers With a57137d I pushed a mitigation. Lets see if it changes something.

tjchambers commented 10 years ago

That seems to have eliminated the errors. Now let me run a clean version.

tjchambers commented 10 years ago

I did not get the BUG in the section I originally reported? But I did get 8 others. Based on them being multiple segments they look like they are valid mutations.

One anomaly: "/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:21:in `cache_key': Use RbConfig instead of obsolete and deprecated Config." - not sure what that means as I am referring to my own AOT::Config module on that line. Maybe the AOT:: was removed during a mutation.

Last login: Mon Aug 11 08:49:06 on ttys003
~@localmbr [08:54:52]> cd projects/aot/aotv2
~/projects/aot/aotv2@localmbr [08:54:57]> RAILS_ENV=test bundle exec mutant -r./config/environment.rb -Iapp/helpers -rweb_cache.rb --use rspec WebCache
Mutant configuration:
Matcher:            #<Mutant::Matcher::Config match_expressions=[<Mutant::Expression: WebCache>] subject_ignores=[] subject_selects=[]>
Integration:        rspec
Expect Coverage:    100.00%
Processes:          8
Includes:           ["app/helpers"]
Requires:           ["./config/environment.rb", "web_cache.rb"]
F.FFFFF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF......F/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:21:in `cache_key': Use RbConfig instead of obsolete and deprecated Config.
/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:21:in `cache_key': Use RbConfig instead of obsolete and deprecated Config.
...............FFFF.FFFFFFFFF.FFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFFFFFFFF.F..F...........................................................................F.F..F.........................FFFFFFFFWebCache#build_cache:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:15
- rspec:WebCache
evil:WebCache#build_cache:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:15:6331b

-----------------------
evil:WebCache#build_js:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:51:dba55
Original source:
def build_js
  fetch_cache
  content = ""
  unless @cache.empty?
    content = "<script type='text/javascript' defer='defer'>var #{prefix}a={};"
    @cache.each do |key, value|
      content += process_entry(key, value)
    end
    content += ww_js
    content << "</script>"
  end
  content
end
Mutated Source:
def build_js
  fetch_cache
  content = ""
  unless @cache.empty?
    @cache.each do |key, value|
      content += process_entry(key, value)
    end
  end
  content
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!
-----------------------
evil:WebCache#build_js:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:51:29489
Original source:
def build_js
  fetch_cache
  content = ""
  unless @cache.empty?
    content = "<script type='text/javascript' defer='defer'>var #{prefix}a={};"
    @cache.each do |key, value|
      content += process_entry(key, value)
    end
    content += ww_js
    content << "</script>"
  end
  content
end
Mutated Source:
def build_js
  fetch_cache
  content = ""
  unless @cache.empty?
    content += ww_js
  end
  content
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!
-----------------------

-----------------------
evil:WebCache#build_js:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:51:3c849
Original source:
def build_js
  fetch_cache
  content = ""
  unless @cache.empty?
    content = "<script type='text/javascript' defer='defer'>var #{prefix}a={};"
    @cache.each do |key, value|
      content += process_entry(key, value)
    end
    content += ww_js
    content << "</script>"
  end
  content
end
Mutated Source:
def build_js
  content = ""
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!
-----------------------
evil:WebCache#build_js:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:51:bd1f9
Original source:
def build_js
  fetch_cache
  content = ""
  unless @cache.empty?
    content = "<script type='text/javascript' defer='defer'>var #{prefix}a={};"
    @cache.each do |key, value|
      content += process_entry(key, value)
    end
    content += ww_js
    content << "</script>"
  end
  content
end
Mutated Source:
def build_js
  unless @cache.empty?
    content = "<script type='text/javascript' defer='defer'>var #{prefix}a={};"
    @cache.each do |key, value|
      content += process_entry(key, value)
    end
    content += ww_js
    content << "</script>"
  end
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!

-----------------------
evil:WebCache#detail:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:72:3a621
Original source:
def detail(e1, e2, w)
  idx = get_index(w)
  unless @cache.include?(e1)
    @cache[e1] = [[], [], []]
  end
  @cache[e1][idx] << e2
  unless @cache.include?(e2)
    @cache[e2] = [[], [], []]
  end
  @cache[e2][idx] << e1
end
Mutated Source:
def detail(e1, e2, w)
  unless @cache.include?(e1)
    @cache[e1] = [[], [], []]
  end
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!
-----------------------
evil:WebCache#detail:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:72:131d7
Original source:
def detail(e1, e2, w)
  idx = get_index(w)
  unless @cache.include?(e1)
    @cache[e1] = [[], [], []]
  end
  @cache[e1][idx] << e2
  unless @cache.include?(e2)
    @cache[e2] = [[], [], []]
  end
  @cache[e2][idx] << e1
end
Mutated Source:
def detail(e1, e2, w)
  @cache[e1][idx] << e2
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!
-----------------------
evil:WebCache#detail:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:72:d3458
Original source:
def detail(e1, e2, w)
  idx = get_index(w)
  unless @cache.include?(e1)
    @cache[e1] = [[], [], []]
  end
  @cache[e1][idx] << e2
  unless @cache.include?(e2)
    @cache[e2] = [[], [], []]
  end
  @cache[e2][idx] << e1
end
Mutated Source:
def detail(e1, e2, w)
  unless @cache.include?(e2)
    @cache[e2] = [[], [], []]
  end
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!

-----------------------
evil:WebCache#get_from_file:/Users/tj/projects/AOT/aotv2/app/helpers/web_cache.rb:37:32d81
Original source:
def get_from_file
  if File.exist?(cache_key)
    JSON.load(open(cache_key).read)
  else
    data = build_cache
    File.open(cache_key, "w") do |file|
      file.write(JSON.pretty_generate(data))
    end
    data
  end
end
Mutated Source:
def get_from_file
  if File.exist?(cache_key)
    JSON.load(open(cache_key).read)
  else
    File.open(cache_key, "w") do |file|
      file.write(JSON.pretty_generate(data))
    end
  end
end
BUG: Mutation NOT resulted in exactly one diff. Please report a reproduction!

-----------------------
Mutant configuration:
Matcher:            #<Mutant::Matcher::Config match_expressions=[<Mutant::Expression: WebCache>] subject_ignores=[] subject_selects=[]>
Integration:        rspec
Expect Coverage:    100.00%
Processes:          8
Includes:           ["app/helpers"]
Requires:           ["./config/environment.rb", "web_cache.rb"]
Available Subjects: 12
Subjects:           12
Mutations:          496
Kills:              135
Alive:              361
Runtime:            76.25s
Killtime:           68.15s
Overhead:           11.89%
Coverage:           27.22%
Expected:           100.00%
~/projects/aot/aotv2@localmbr [08:56:43]>
mbj commented 10 years ago

@tjchambers Thats as expected. I'm about to fix my usage of diff/lcs to produce a nice looking diff for these cases while still hardwireing some constraints into the generator.

tjchambers commented 10 years ago

Thanks for the hint on how to confirm I am using HEAD. I now see how that works.

tjchambers commented 10 years ago

I must declare I am having problems with this latest version of mutant on another module. I am getting the NEUTRAL issue where it says my tests are failing without code changes. All my specs pass. No mutants killed. I have not tested this class source on a prior version. Just an FYI - am trying to simplify it to see what the issue is.

mbj commented 10 years ago

@tjchambers I think that neutral issue does not belong here and is not directly related. Please report it separately once you have a reproduction.