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

first try to fix exception related to TimeOffset impact #1146

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

omursahin
Copy link
Collaborator

In src/main/kotlin/org/evomaster/core/search/gene/datetime/TimeGene.kt, millisecond and ofsett are missing. That causes "java.util.NoSuchElementException: Key org.evomaster.core.search.gene.optional.OptionalGene@820b78a is missing in the map." exception while running on the SUTs.

In this PR, I fixed it, but we need to check if it is the correct way.

Stacktrace:

  • Starting to generate test cases
    20:33:19.044 [main] WARN o.e.c.s.i.i.ImpactUtils - the impact of LimitObjectGene was collected in a general manner, i.e., GeneImpact
    20:33:19.205 [main] WARN o.e.c.s.i.i.ImpactUtils - the impact of CycleObjectGene was collected in a general manner, i.e., GeneImpact EvoMaster process terminated abruptly. This is likely a bug in EvoMaster. Please copy&paste the following stacktrace, and create a new issue on �[34mhttps://github.com/EMResearch/EvoMaster/issues�[0m�[0m
    java.util.NoSuchElementException: Key org.evomaster.core.search.gene.optional.OptionalGene@7417ef4f is missing in the map.
    at kotlin.collections.MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(MapWithDefault.kt:24)
    at kotlin.collections.MapsKt__MapsKt.getValue(Maps.kt:349)
    at org.evomaster.core.search.gene.datetime.TimeGene.adaptiveSelectSubsetToMutate(TimeGene.kt:116)
    at org.evomaster.core.search.gene.Gene.selectSubsetToMutate(Gene.kt:665)
    at org.evomaster.core.search.gene.Gene.standardMutation(Gene.kt:574)
    at org.evomaster.core.search.gene.Gene.standardMutation(Gene.kt:581)
    at org.evomaster.core.search.service.mutator.StandardMutator.innerMutate(StandardMutator.kt:278)
    at org.evomaster.core.search.service.mutator.StandardMutator.mutate(StandardMutator.kt:301)
    at org.evomaster.core.search.service.mutator.Mutator.mutateAndSave(Mutator.kt:163)
    at org.evomaster.core.search.algorithms.MioAlgorithm.searchOnce(MioAlgorithm.kt:48)
    at org.evomaster.core.search.service.SearchAlgorithm.search(SearchAlgorithm.kt:77)
    at org.evomaster.core.Main$Companion.run(Main.kt:579)
    at org.evomaster.core.Main$Companion.initAndRun(Main.kt:175)
    at org.evomaster.core.Main$Companion.main(Main.kt:85)
    at org.evomaster.core.Main.main(Main.kt)

image

@omursahin omursahin requested a review from arcuri82 December 12, 2024 09:42
@arcuri82 arcuri82 requested a review from man-zhang December 12, 2024 11:13
@arcuri82
Copy link
Collaborator

@man-zhang hi, as this PR involves "impact", can you first review it? i can then review it as well afterwards. thx!

@man-zhang
Copy link
Contributor

hi, @arcuri82 sorry for the late reply. I will prioritize this task and review it soon.

@arcuri82
Copy link
Collaborator

arcuri82 commented Jan 2, 2025

this has now been reported as well on issues page: #1150

@man-zhang man-zhang requested review from arcuri82 and removed request for arcuri82 January 3, 2025 03:10
@man-zhang
Copy link
Contributor

hi @arcuri82, I have reviewed the updates, made some fixes, and add a test. now it is ready for you to review.

@arcuri82 arcuri82 merged commit 3219696 into master Jan 3, 2025
14 checks passed
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

Successfully merging this pull request may close these issues.

3 participants