Programming-Systems-Lab / chroniclerj

Efficiently recording and reproducing failures in deployed applications
14 stars 8 forks source link

Chronicler with Defects4J not creating .test file #3

Open asn10038 opened 6 years ago

asn10038 commented 6 years ago

Trying to run Chronicler with Defects4J. Can create logs, but can't create the .test file required for replay. Not sure what issue is yet.

The following script replicates the issue:

# Script shows Chronicler creates logs but not zip file that can be replayed

cd /tmp

# clone and set up defects4j
git clone https://github.com/rjust/defects4j.git
cd defects4j
./init.sh
export PATH=$PATH:"/tmp/defects4j/framework/bin"
cd ../

# clone and make chronicler
git clone https://github.com/Programming-Systems-Lab/chroniclerj.git
cd chroniclerj
cd Code/ChroniclerJ
mvn package install

# clone buggy version from defects4j
cd /tmp
defects4j checkout -p Lang -v 1b -w /tmp/lang_1_buggy
cd /tmp/lang_1_buggy

# Include Chronicler to Record events
export JAVA_TOOL_OPTIONS="-Xbootclasspath/p:/tmp/chroniclerj/Code/ChroniclerJ/target/ChroniclerJ-0.43-SNAPSHOT.jar -javaagent:/tmp/chroniclerj/Code/ChroniclerJ/target/ChroniclerJ-0.43-SNAPSHOT.jar=alwaysExport"

# Run the test and generate the logs
defects4j test -t NumberUtilsTest::TestLang747

# Creates logs but none of them are zip files of the form *.test that are replayable. Everything stays as *.log
# files are in /tmp/lang_1_buggy
asn10038 commented 6 years ago

Null pointer error caused by logFile not having parent file. Fixed by applying File logFile = new File(System.getProperty("user.dir")+File.separator+(nameOverride == null ? name : nameOverride)); in ChroniclerJExportRunner.java. Will open PR shortly

asn10038 commented 6 years ago

See commit: 095d9527115444a3fd316c2f9d14cff282179419