Title: ContestEstimator fails with java.lang.NullPointerException · Issue #558 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: ContestEstimator fails with java.lang.NullPointerException · Issue #558 · UnitTestBot/UTBotJava
X Title: ContestEstimator fails with java.lang.NullPointerException · Issue #558 · UnitTestBot/UTBotJava
Description: Description ContestEstimator throws unexpected java.lang.NullPointerException and generates empty test class on enums To Reproduce Launch contestEstimator with methodFilter = "com.google.common.base.CaseFormat.*" and projectFilter = null...
Open Graph Description: Description ContestEstimator throws unexpected java.lang.NullPointerException and generates empty test class on enums To Reproduce Launch contestEstimator with methodFilter = "com.google.common.bas...
X Description: Description ContestEstimator throws unexpected java.lang.NullPointerException and generates empty test class on enums To Reproduce Launch contestEstimator with methodFilter = "com.google.commo...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/558
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ContestEstimator fails with java.lang.NullPointerException","articleBody":"**Description**\r\n\r\nContestEstimator throws unexpected `java.lang.NullPointerException` and generates empty test class on enums\r\n\r\n**To Reproduce**\r\n\r\nLaunch contestEstimator with `methodFilter = \"com.google.common.base.CaseFormat.*\"` and `projectFilter = null` and 120s time limit\r\n\r\n**Expected behavior**\r\n\r\nTests generated\r\n\r\n**Actual behavior**\r\n\r\n`java.lang.NullPointerException` is thrown and empty test class is generated\r\n\r\n**Visual proofs (screenshots, logs, images)**\r\n\r\nGenerated test file:\r\n```Java\r\npackage com.google.common.base;\r\n\r\npublic class CaseFormatTest {\r\n}\r\n```\r\n\r\nFrom console:\r\n```\r\nException in thread \"SymbolicExecution\" java.lang.NullPointerException: classId.jClass.enumConstants must not be null\r\n\tat org.utbot.fuzzer.providers.EnumModelProvider$generate$1.invokeSuspend(EnumModelProvider.kt:18)\r\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\r\n\tat kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:140)\r\n\tat org.utbot.fuzzer.ModelProvider$Combined$generate$1.invokeSuspend(ModelProvider.kt:143)\r\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\r\n\tat kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:140)\r\n\tat org.utbot.fuzzer.FuzzerKt.fuzz(Fuzzer.kt:76)\r\n\tat org.utbot.fuzzer.providers.ObjectModelProvider$Companion.fuzzParameters(ObjectModelProvider.kt:173)\r\n\tat org.utbot.fuzzer.providers.ObjectModelProvider$Companion.access$fuzzParameters(ObjectModelProvider.kt:145)\r\n\tat org.utbot.fuzzer.providers.ObjectModelProvider$generate$1.invokeSuspend(ObjectModelProvider.kt:82)\r\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\r\n\tat kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:140)\r\n\tat org.utbot.fuzzer.ModelProvider$Combined$generate$1.invokeSuspend(ModelProvider.kt:143)\r\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\r\n\tat kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:140)\r\n\tat org.utbot.fuzzer.FuzzerKt.fuzz(Fuzzer.kt:76)\r\n\tat org.utbot.engine.UtBotSymbolicEngine$fuzzing$2.invokeSuspend(UtBotSymbolicEngine.kt:426)\r\n\tat org.utbot.engine.UtBotSymbolicEngine$fuzzing$2.invoke(UtBotSymbolicEngine.kt)\r\n\tat kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)\r\n\tat kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:212)\r\n\tat kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1$lambda$1.emit(Collect.kt:134)\r\n\tat kotlinx.coroutines.flow.FlowKt__BuildersKt$flowOf$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)\r\n\tat kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)\r\n\tat org.utbot.contest.ContestKt$runGeneration$1$invokeSuspend$$inlined$bracket$lambda$1$1.invokeSuspend(Contest.kt:519)\r\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\r\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)\r\n```\r\n\r\n**Additional context**\r\n\r\nWas working ok in main on 11.07.2022\r\n","author":{"url":"https://github.com/volivan239","@type":"Person","name":"volivan239"},"datePublished":"2022-07-19T16:14:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/558/UTBotJava/issues/558"}
| 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:acc82172-77c7-566b-156e-27c437d13444 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80D6:10362C:19FEE16:21A9D64:698FE29A |
| html-safe-nonce | a44202747e6938f9cabae5187e422c8c79d0981f6eefc2e255fc79960c0b450e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEQ2OjEwMzYyQzoxOUZFRTE2OjIxQTlENjQ6Njk4RkUyOUEiLCJ2aXNpdG9yX2lkIjoiMTAzODQzNDQxODgwODUxMDk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7f88ff5a90fe193cd253213cd1ebaf257631624f6e7c3b2ba4c63bb4c2cf2fff |
| hovercard-subject-tag | issue:1309754976 |
| 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/558/issue_layout |
| twitter:image | https://opengraph.githubassets.com/95140e96484b5abeac0446f0a5f5e5f67ecd632f31cc8c996cc6caae9b690cf3/UnitTestBot/UTBotJava/issues/558 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/95140e96484b5abeac0446f0a5f5e5f67ecd632f31cc8c996cc6caae9b690cf3/UnitTestBot/UTBotJava/issues/558 |
| og:image:alt | Description ContestEstimator throws unexpected java.lang.NullPointerException and generates empty test class on enums To Reproduce Launch contestEstimator with methodFilter = "com.google.common.bas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | volivan239 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| 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 | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width