Skip to content

Conversation

@oetr
Copy link
Contributor

@oetr oetr commented Sep 25, 2025

Adds a Set mutator to the mutation framework.

@oetr oetr force-pushed the CIF-1787-set-mutator branch 4 times, most recently from bc93823 to 43b5a02 Compare November 3, 2025 18:40
@oetr oetr requested a review from Copilot November 3, 2025 18:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Set mutation in the Jazzer mutation framework, mirroring the existing implementations for List and Map.

Key Changes

  • Implemented SetMutatorFactory with mutation operations (delete, insert, mutate chunks) and crossover operations
  • Extended ChunkMutations and ChunkCrossOvers utility classes to support Set operations
  • Added comprehensive test coverage in SetMutatorTest with parameterized tests for all operations
  • Updated @WithSize annotation to support Set types alongside List and Map

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
SetMutatorFactory.java New factory implementing Set mutation with chunk-based operations similar to List/Map mutators
CollectionMutators.java Registered SetMutatorFactory in the list of available mutator factories
ChunkMutations.java Added mutateRandomChunk method for Set with duplicate handling logic
ChunkCrossOvers.java Added insertChunk, overwriteChunk, and crossOverChunk operations for Set
WithSize.java Extended annotation to apply to Set types
TestSupport.java Added utility methods: asSet, isEmpty, getCallerMethodName, and ParameterizedTestUtils.prependArgs
SetMutatorTest.java Comprehensive parameterized tests covering all Set mutation and crossover operations
StressTest.java Added stress test cases for Set types and setSizeInClosedRange helper
ArgumentsMutatorFuzzTest.java Added fuzz tests for Set types and fixed typo in method name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@oetr oetr force-pushed the CIF-1787-set-mutator branch from 43b5a02 to 5f9e596 Compare November 3, 2025 18:54
@oetr oetr marked this pull request as ready for review November 3, 2025 19:03
Copy link
Contributor

@simonresch simonresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Very thorough test cases. 🚀

@oetr oetr force-pushed the CIF-1787-set-mutator branch from 5f9e596 to ccb46bc Compare November 4, 2025 10:34
@oetr oetr enabled auto-merge (rebase) November 4, 2025 10:38
@oetr oetr merged commit f8668e2 into main Nov 4, 2025
9 checks passed
@oetr oetr deleted the CIF-1787-set-mutator branch November 4, 2025 11:05
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