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

Code coverage analysis does not support Jsoup-{4,6,9} #627

Open
rjust opened this issue Nov 2, 2024 · 6 comments
Open

Code coverage analysis does not support Jsoup-{4,6,9} #627

rjust opened this issue Nov 2, 2024 · 6 comments

Comments

@rjust
Copy link
Owner

rjust commented Nov 2, 2024

Code coverage does not run on three Jsoup defects (4, 6, and 9) -- the code coverage instrumentation exceeds the method size bytecode limit for these defects.

@JoyKrishan
Copy link

JoyKrishan commented Nov 11, 2024

Hi,

  • Defects4J -- version 2.1.0
  • Java 8

I faced similar issues while collecting coverage for Jsoup using GZoltar.

Moreover, while collecting test coverage using GZoltar for JacksonDatabind {58-63}, {65, 66, 67, 68, 69, 70,71, 72, 73}, {75, 76, 77, 78, 79}, using the relevant test, a ClassCircularityError was thrown. I ran GZoltar till version 79.

For JacksonDatabind defects ({1-57}, 64, 74), code coverage ran.

I have added the stacktrace below while collecting coverage for bug-58. (Similar error for all the mentioned version if a relevant test uses AccessFixTest class>> AccessFixTest$CauseBlockingSecurityManager.checkPermission)

java.util.concurrent.ExecutionException: java.lang.ClassCircularityError: java/security/Permission
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.gzoltar.internal.core.test.TestRunner.run(TestRunner.java:39)
at com.gzoltar.cli.commands.RunTestMethods.execute(RunTestMethods.java:105)
at com.gzoltar.cli.Main.execute(Main.java:105)
at com.gzoltar.cli.Main.main(Main.java:40)
Caused by: java.lang.ClassCircularityError: java/security/Permission
at com.fasterxml.jackson.databind.misc.AccessFixTest$CauseBlockingSecurityManager.checkPermission(AccessFixTest.java:16)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:825)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1363)
at sun.misc.URLClassPath.getResource(URLClassPath.java:250)
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:359)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at junit.framework.TestResult.addError(TestResult.java:37)
at junit.framework.TestResult.runProtected(TestResult.java:148)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:57)
at com.gzoltar.internal.core.test.junit.JUnitTestTask.call(JUnitTestTask.java:25)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:750)
Exception in thread "main" java.lang.ClassCircularityError: java/security/Permission
at com.fasterxml.jackson.databind.misc.AccessFixTest$CauseBlockingSecurityManager.checkPermission(AccessFixTest.java:16)
at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1262)
at java.lang.System.setProperties(System.java:692)
at com.gzoltar.cli.commands.RunTestMethods.execute(RunTestMethods.java:109)
at com.gzoltar.cli.Main.execute(Main.java:105)
at com.gzoltar.cli.Main.main(Main.java:40)
Exception in thread "Thread-1" java.lang.ClassCircularityError: java/security/Permission
at com.fasterxml.jackson.databind.misc.AccessFixTest$CauseBlockingSecurityManager.checkPermission(AccessFixTest.java:16)
at java.util.logging.LogManager.checkPermission(LogManager.java:1586)
at java.util.logging.LogManager.reset(LogManager.java:1319)
at java.util.logging.LogManager$Cleaner.run(LogManager.java:239)

@JoyKrishan
Copy link

For Jsoup.

GZoltar failed to run coverage for bug {1-53}, however {54-93}, I could collect coverage data.

@rjust
Copy link
Owner Author

rjust commented Nov 13, 2024

@JoyKrishan Just to clarify: You are observing GZoltar failing on additional Jsoup and JacksonDatabind defects, but you are not observing defects4j coverage fail on those defects -- correct?

@JoyKrishan
Copy link

@rjust Yes, correct.
defects4j coverage works on the mentioned buggy version of Jsoup and JacksonDatabind.

@rjust
Copy link
Owner Author

rjust commented Nov 13, 2024

@jose Is this something that should be tracked on the GZoltar side?

@JoyKrishan
Copy link

JoyKrishan commented Nov 14, 2024

Hi @jose,

For your reference,
Here, is the complete chart of all projects and their versions on which GZoltar passed and failed to collect coverage.

Defects4J V2.1.0
Java 8

Identifier Number of Fault Localized Bugs Number of Failed FL IDs on which GZoltar Failed
Chart 0 0 None
Cli 0 0 None
Closure 140 34 90-92, 94-105, 134-152
Codec 18 0 None
Collections 28 0 None
Compress 47 0 None
Csv 16 0 None
Gson 18 0 None
JacksonCore 26 0 None
JacksonDatabind 53 47 58-63, 65-73, 75-87, 89-92, 95-98, 99-106, 108-109, 111-112
JacksonXml 6 0 None
Jsoup 40 53 1-53
JxPath 22 0 None
Lang 61 0 None
Math 106 0 None
Mockito 28 0 None
Time 26 0 None

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

No branches or pull requests

2 participants