defects4j icon indicating copy to clipboard operation
defects4j copied to clipboard

`defects4j export` removes .class files

Open jose opened this issue 8 years ago • 8 comments

Hi,

I noticed that for (at least one) Mockito's bug defects4j export deletes the test classes directory. For example, suppose that I checkout Mockito-25b and then I compile it:

$ $D4J_HOME/framework/bin/defects4j checkout -p Mockito -v 25b -w Mockito-25b
$ cd Mockito-25b
$ $D4J_HOME/framework/bin/defects4j compile

at this point I have a target directory with two sub-directories: classes and test-classes, each one with the respective .class files.

But, if I execute $D4J_HOME/framework/bin/defects4j export -p cp.compile or $D4J_HOME/framework/bin/defects4j export -p cp.test the target/test-classes is deleted.

The world will not end tomorrow just because of this, but anyway... :smiley:

jose avatar Sep 03 '16 02:09 jose

This is related to issue #111. Defects4J calls the compile task of the project before exporting a property. Since the dependencies are set up in a way that every compilation cleans the target directories first, the test classes are deleted.

rjust avatar Aug 28 '17 02:08 rjust

hi. can u please help me with the set up process of defects4j. i do clone but thereafter , i am not able to run all commands eg. defects4j info -p Lang

mudasirhw avatar Jan 31 '19 06:01 mudasirhw

@mobilemania123 This issue about removing .class files is not the right place to ask an unrelated question. As a quick answer, merely cloning is not enough. You should follow the setup instructions.

mernst avatar Jan 31 '19 13:01 mernst

@rjust @jose Issue #111 was closed---did that resolve this issue?

bkushigian avatar Apr 16 '20 20:04 bkushigian

@bkushigian, no.

jose avatar Apr 18 '20 09:04 jose