-
Notifications
You must be signed in to change notification settings - Fork 300
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
Running Lang 62 #130
Comments
Hi @loren138, I am not entirely sure how the (default) behavior of Randoop changed, but does Randoop's Randoop should be able to test these classes if you provide org.apache.commons.lang as the package name. Let me know whether this does the trick. If not, I can dig a little deeper into the differences between Randoop v2 and v3. Thanks, |
Thanks for the thoughts! I added in defects4j/framework/util/randoop.config Line 10 in a910322
If I leave I think I found it! It looks like Related Links: |
If I remember correctly, the recommendation was to set the Setting the |
Unfortunately, in randoop now, you do have to set
I guess you'll either need to restrict d4j to a randoop version before that for testing purposes or add package names to the dataset. I've written a little script to grab the package name from the modified classes by just taking the package part of the first one. I don't currently handle if the modified classes are in separate packages. |
One possibility is to group target classes by package name (which requires knowledge about the packages) and invoke Randoop once for each distinct package name, using the Note that you don't have to change Defects4J to play with different configuration options -- you can provide your own randoop.config file by setting the environment variable: RANDOOP_CONFIG_FILE. Also, we should upgrade the supported version of Randoop in Defects4J to the latest version (3.1.5), so if you have suggestions for better default configuration options that would be great. Thanks, |
This might be related to #25 I'm trying to generate regression tests for Lang 62 in the same style as Defects4J.
If I run:
java -cp /home/loren/pullTest/bertGithub/src/main/java/:/home/loren/pullTest/bertGithub/junit-4.12.jar:/home/loren/pullTest/bertGithub/hamcrest-core-1.3.jar:/home/loren/pullTest/bertGithub/slf4j-nop-1.7.25.jar:/home/loren/ramdisk/Lang_62/version/oldInst/:/home/loren/pullTest/bertGithub/randoop-all-3.1.5.jar randoop.main.Main gentests --testclass=org.apache.commons.lang.Entities --testclass=org.apache.commons.lang.IntHashMap --timelimit=180 --ignore-flaky-tests=true --only-test-public-members=true --clear=10000 --string-maxlen=5000 --forbid-null=false --null-ratio=0.1 --no-error-revealing-tests=true --noprogressdisplay=true --testsperfile=250 --randomseed=3347 --junit-output-dir=/home/loren/ramdisk/Lang_62/version/randoop/
I get
This is on Randoop 3.1.5.
It appears that both classes in Apache Lang are indeed package private. (ie declared as just
class Name
notpublic class Name
) but the Defects4J paper (Do Automatically Generated Unit tests...) shows randoop as running tests on those classes. Do you have any idea if there has been a change in behavior in Randoop since then or was some other setting used for generating those tests?https://github.com/apache/commons-lang/blob/LANG_2_6/src/main/java/org/apache/commons/lang/Entities.java
https://github.com/apache/commons-lang/blob/LANG_2_6/src/main/java/org/apache/commons/lang/IntHashMap.java
I tried to copy the settings from the perl files, but it's possible I got some of them wrong.
The text was updated successfully, but these errors were encountered: