Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutation "-i" option not working #87

Closed
diogomfreitas opened this issue Jun 7, 2017 · 1 comment
Closed

Mutation "-i" option not working #87

diogomfreitas opened this issue Jun 7, 2017 · 1 comment
Labels

Comments

@diogomfreitas
Copy link

I have created a instrument_classes file with the classes that i want to be mutated, but at the end, all mutants listed in mutatnts.log file belong to the class modified by the fix. In version 51 its org.apache.commons.lang.BooleanUtils.

Im runing the following comand for the checkout of version 51f:
defects4j mutation -i classes.src

classes.src contains the following:

org.apache.commons.lang.ArrayUtils
org.apache.commons.lang.ArrayUtilsTest
org.apache.commons.lang.BitField
org.apache.commons.lang.BooleanUtils
org.apache.commons.lang.CharEncoding
org.apache.commons.lang.mutable.MutableBoolean

It results in 391 generated mutants:

Mutants generated: 391
Mutants covered: 391
Mutants killed: 283
Mutation score: 72.4% (72.4%)
Total run time: 47.0 seconds

Which is the same result as running defects4j mutation without the "-i" parameter

@rjust rjust added the bug label Jul 19, 2017
@rjust
Copy link
Owner

rjust commented Jul 19, 2017

Hi @diogom42,

Thanks for the bug report!

This seems to be caching issue. For efficiency reasons, the classes are not re-mutated after the first execution of defects4j mutation, which is useful when running multiple test suites against the same set of mutants. The cache of mutated classes, however, needs to be updated if setting the "-i" flag changes the set of classes that should be mutated. This is apparently not the case and clearly a bug.

As a workaround, the "-i" option is working properly on a fresh working copy (i.e., defects4j checkout followed by defects4j mutation -i ...).

Thanks,
René

rjust added a commit that referenced this issue Aug 9, 2017
rjust added a commit that referenced this issue Aug 14, 2017
Clean up mutation-related modules and fix issue #87
@rjust rjust closed this as completed Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants