Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request fixes support for complex nested generic types like List<List<Integer>[]> by removing overly restrictive type filtering from the parameterTypeIfParameterized helper function. Previously, this function filtered out generic array types (GenericArrayType), preventing them from being used as list element types. The fix delegates type validation to the mutation framework, which already has proper support for these types.
Key changes:
- Simplified
parameterTypeIfParameterizedto remove type filtering logic that rejectedGenericArrayTypeand other non-ParameterizedType/non-Classtypes - Added test coverage for
List<List<Integer>[]>to verify the fix works correctly - Enhanced logging output in
ArgumentsMutatorFuzzTestfor better debugging
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java | Removed restrictive type checks from parameterTypeIfParameterized, allowing generic array types to be returned as valid parameter types |
| src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java | Added test case testParameterTypeIfParameterizedList to verify List<List<Integer>[]> is properly handled |
| selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/ArgumentsMutatorFuzzTest.java | Added fuzz test fuzzGenericClass to test mutation of List<List<Integer>[]> and improved logging to show parameter types for better debugging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/ArgumentsMutatorFuzzTest.java
Show resolved
Hide resolved
selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/ArgumentsMutatorFuzzTest.java
Outdated
Show resolved
Hide resolved
selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/ArgumentsMutatorFuzzTest.java
Outdated
Show resolved
Hide resolved
1ddbe78 to
ddde2b2
Compare
The new format is: - fuzzGenericClass(List) -> Arguments[List<List<Integer>[]>] It is especially useful to see the mutator when debugging or trying out new mutators with @Solo.
Previously, types like List<List<Integer>[]> failed because the parameterTypeIfParameterized helper function incorrectly filtered out generic array types. Removed this filtering since the mutation framework already handles supported type matching.
ddde2b2 to
25fda14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, types like
List<List<Integer>[]>failed because theparameterTypeIfParameterizedhelper function incorrectly filtered outgeneric array types. Removed this filtering since the mutation
framework already handles supported type matching.