Title: JaCoCo evaluation report is failed during measuring coverage in run_with_coverage.sh script · Issue #762 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: JaCoCo evaluation report is failed during measuring coverage in run_with_coverage.sh script · Issue #762 · UnitTestBot/UTBotJava
X Title: JaCoCo evaluation report is failed during measuring coverage in run_with_coverage.sh script · Issue #762 · UnitTestBot/UTBotJava
Description: Description The section of the documentation https://github.com/UnitTestBot/UTBotJava/blob/main/docs/jlearch/setup.md#continue-setup could not be reproduced correctly The JaCoCo report is not generated. To Reproduce Train the minimal mod...
Open Graph Description: Description The section of the documentation https://github.com/UnitTestBot/UTBotJava/blob/main/docs/jlearch/setup.md#continue-setup could not be reproduced correctly The JaCoCo report is not gener...
X Description: Description The section of the documentation https://github.com/UnitTestBot/UTBotJava/blob/main/docs/jlearch/setup.md#continue-setup could not be reproduced correctly The JaCoCo report is not gener...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/762
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JaCoCo evaluation report is failed during measuring coverage in run_with_coverage.sh script","articleBody":"**Description**\r\n\r\nThe section of the documentation https://github.com/UnitTestBot/UTBotJava/blob/main/docs/jlearch/setup.md#continue-setup\r\ncould not be reproduced correctly\r\n\r\nThe JaCoCo report is not generated.\r\n\r\n**To Reproduce**\r\n\r\n1. Train the minimal model according provided instruction\r\n2. Run the last step to measure the quality of the model\r\n3. Obtain a few errors: a few failed tests due to the row ./gradlew :utbot-junit-contest:test :utbot-junit-contest:jacocoTestReport\r\n4. If comment first part with running tests, you will obtain the failing of report generation\r\n5. If run the :utbot-junit-contest:jacocoTestReport with flags --stacktrace you could find the real reason\r\n\r\n \r\n**Expected behavior**\r\n\r\nReport should be generated\r\n\r\n**Actual behavior**\r\n\r\nGot the following stacktrace\r\n\r\n```\r\nCaused by: java.io.IOException: Error while analyzing /home/jupyter-z00663679/UTBotJava/utbot-junit-contest/build/resources/main/lib/utbot-instrumentation-1.0-SNAPSHOT.jar@kotlin/reflect/jvm/internal/impl/serialization/deserialization/builtins/BuiltInsResourceLoader.class.\r\n at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:162)\r\n at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:134)\r\n at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:157)\r\n at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:193)\r\n at org.jacoco.core.analysis.Analyzer.analyzeZip(Analyzer.java:265)\r\n at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:196)\r\n at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:226)\r\n at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:221)\r\n at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:221)\r\n at org.jacoco.ant.ReportTask.createBundle(ReportTask.java:570)\r\n at org.jacoco.ant.ReportTask.createReport(ReportTask.java:545)\r\n at org.jacoco.ant.ReportTask.execute(ReportTask.java:496)\r\n ... 140 more\r\nCaused by: java.lang.IllegalStateException: Can't add different class with same name: kotlin/reflect/jvm/internal/impl/serialization/deserialization/builtins/BuiltInsResourceLoader\r\n at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:106)\r\n at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:99)\r\n at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:378)\r\n at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:100)\r\n at org.objectweb.asm.ClassReader.accept(ClassReader.java:722)\r\n at org.objectweb.asm.ClassReader.accept(ClassReader.java:401)\r\n at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:116)\r\n at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:132)\r\n ... 150 more\r\n\r\n\r\n```\r\n\r\n**Additional context**\r\n\r\nThe following solution solves the problem:\r\n\r\n1. Change gradle script in the \r\n```\r\njacocoTestReport {\r\n doFirst {\r\n delete fileTree (dir: \"${buildDir}/resources/main/lib\")\r\n }\r\n reports {\r\n html.enabled = true\r\n }\r\n}\r\n```\r\nIt removes the utbot-instrumentation.jar from the analyzing path\r\n2. Run `./gradlew :utbot-junit-contest:assemble`\r\n3. Re-run the `run_with_coverage.sh` script like the following command `./scripts/run_with_coverage.sh antlr 10 \"NN_REWARD_GUIDED_SELECTOR models/linear/0\" linear0 true`\r\n4. The report is found under `eval/jacoco`","author":{"url":"https://github.com/amandelpie","@type":"Person","name":"amandelpie"},"datePublished":"2022-08-22T14:00:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/762/UTBotJava/issues/762"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06a1963f-f38d-b1e6-f294-8beb24dc8190 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8642:127BA:4A1AEA:632922:698E5563 |
| html-safe-nonce | 6eaaaa677b41f1d5fa030d8a38b9f0ef6acfd8ede975010fdcd7adb0fc13e4b7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjQyOjEyN0JBOjRBMUFFQTo2MzI5MjI6Njk4RTU1NjMiLCJ2aXNpdG9yX2lkIjoiNTExOTQyNTE0Mzk4NzEzMTc0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e5b40e9a4c42d84a4879291f32d54ba126125fdac7fa7178b8dc7c6bda1e4045 |
| hovercard-subject-tag | issue:1346472175 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UnitTestBot/UTBotJava/762/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76d7785ebf51bf450600331b655286612e391bfc973495010e25aed5b3a0c476/UnitTestBot/UTBotJava/issues/762 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76d7785ebf51bf450600331b655286612e391bfc973495010e25aed5b3a0c476/UnitTestBot/UTBotJava/issues/762 |
| og:image:alt | Description The section of the documentation https://github.com/UnitTestBot/UTBotJava/blob/main/docs/jlearch/setup.md#continue-setup could not be reproduced correctly The JaCoCo report is not gener... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | amandelpie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e08b85f0035d49bc4c22868f70a4d30fb8c2a777936895c37e78df095242ddc |
| turbo-cache-control | no-preview |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9416d07f3607b074b276ccc81546278f89608a08 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width