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

LANG-9B.log possibly contains incorrect stack-trace #4

Open
xdevroey opened this issue Mar 12, 2020 · 0 comments
Open

LANG-9B.log possibly contains incorrect stack-trace #4

xdevroey opened this issue Mar 12, 2020 · 0 comments

Comments

@xdevroey
Copy link
Member

Opened by @svenpopping

The stacktrace in the file LANG-9B.log is not part of the actual bug in Apache Commons Lang. The bug in the LANG-9B.log is not patched by the fix as proposed in https://issues.apache.org/jira/browse/LANG-832.

The bug patched in https://issues.apache.org/jira/browse/LANG-832 is triggered in the test case testLANG_832. So the LANG-9B.log should contain the stack-trace:

--- org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLANG_832
junit.framework.AssertionFailedError: Parsed dates should be equal expected:<null> but was:<Fri Jan 02 21:00:00 PST 1970>
	at org.junit.Assert.fail(Assert.java:88)
...

Reproduction

Checkout the buggy version of LANG-9
defects4j checkout -p Lang -v 9b

Run the test suite
defects4j test

Running ant (compile.tests)................................................ OK
Running ant (run.dev.tests)................................................ OK
Failing tests: 8
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testParseZone
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLocales_Long_AD
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLANG_832
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLocales_Short_AD
  - org.apache.commons.lang3.time.FastDateParserTest::testParseZone
  - org.apache.commons.lang3.time.FastDateParserTest::testLocales_Long_AD
  - org.apache.commons.lang3.time.FastDateParserTest::testLANG_832
  - org.apache.commons.lang3.time.FastDateParserTest::testLocales_Short_AD

Running botsing using the https://github.com/STAMP-project/botsing-demo guide using the stack-trace https://github.com/SERG-Delft/JCrashPack/blob/master/crashes/Commons-lang/LANG-9b/LANG-9b.log. Add the generated test case to the LANG-9 test suite.

Re-run the test suite
defects4j test

Running ant (compile.tests)................................................ OK
Running ant (run.dev.tests)................................................ OK
Failing tests: 9
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testParseZone
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLocales_Long_AD
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLANG_832
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLocales_Short_AD
  - org.apache.commons.lang3.time.FastDateParserTest::testParseZone
  - org.apache.commons.lang3.time.FastDateParserTest::testLocales_Long_AD
  - org.apache.commons.lang3.time.FastDateParserTest::testLANG_832
  - org.apache.commons.lang3.time.FastDateParserTest::testLocales_Short_AD
  - org.apache.commons.lang3.time.FastDateParser_ESTest::test0

Checkout the fix version of LANG-9 and add the generated test case from Botsing again
defects4j checkout -p Lang -v 9f

Run the test suite
defects4j test

Running ant (compile.tests)................................................ OK
Running ant (run.dev.tests)................................................ OK
Failing tests: 7
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testParseZone
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLocales_Long_AD
  - org.apache.commons.lang3.time.FastDateFormat_ParserTest::testLocales_Short_AD
  - org.apache.commons.lang3.time.FastDateParserTest::testParseZone
  - org.apache.commons.lang3.time.FastDateParserTest::testLocales_Long_AD
  - org.apache.commons.lang3.time.FastDateParserTest::testLocales_Short_AD
  - org.apache.commons.lang3.time.FastDateParser_ESTest::test0

So only the failing test case testLANG_832 will be patched by the fix for LANG-9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant