jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Randomized Stress Testing Identifies Possible Regression Failures in StringUtil Logic

Open rbellazar opened this issue 7 months ago • 1 comments

JabRef version

6.0-alpha.5

Operating system

Windows

Details on version and operating system

JabRef Version: 6.0-alpha.5--2026-04-20 Windows 11 Home Java Version: 25.0.2 JavaFX Version: 26

Checked with the latest development build (copy version output from About dialog)

  • [x] I made a backup of my libraries before testing the latest development version.
  • [x] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Navigate to the org.jabref.logic.util.strings.StringUtil class within the jablib module.
  2. Use a tool such as Randoop or a manual JUnit suite to run a randomized stress test that passes faulty Unicode sequences or nested HTML elements (such as \b>") into the alignStringTable or stripHtml methods.
  3. Examine the runtime result and compare it with the anticipated sanitized string.

StringUtil.java

Appendix

Task :jablib:test FAILED RegressionTest1 > test615() FAILED org.opentest4j.AssertionFailedError: expected: <> but was: at org.jabref.logic.util.strings.StringUtil.stripHtml(StringUtil.java:124)

RegressionTest1 > test638() FAILED org.opentest4j.AssertionFailedError: expected: <0> but was: <0>

954 tests completed, 50 failed BUILD FAILED in 7s

Image Image

rbellazar avatar Apr 21 '26 09:04 rbellazar

Useless without any context

Siedlerchr avatar Apr 24 '26 18:04 Siedlerchr