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

Update CollectionsBidiMapFuzzer.java Enhance Fuzzing Coverage and Input Variability for CollectionsBidiMapFuzzer #12848

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shivam7-1
Copy link
Contributor

PR Description:

In this PR improve fuzzing coverage handle more diverse input sizes, and ensure the BidiMap is freshly initialized for each test. The changes focus on improving the randomness of the fuzzed input, ensuring that each test runs with an independent map instance, and making the fuzzing more comprehensive by introducing variable-length strings.
Changes Done in this:

  1. BidiMap Initialization Inside runTest Method:

    • The BidiMap (m_bidiMap) is now instantiated inside the runTest method, ensuring that each fuzzing test operates on a fresh map instance. This avoids potential issues where the map state is carried over between tests, ensuring more accurate results.
  2. Handling Variable Size Strings:

    • The fuzzed input strings are now consumed with random lengths between 5 and 15 characters (instead of always using a fixed size of 10). This change makes the fuzzing process more dynamic and tests the code against a wider range of string sizes, increasing the likelihood of uncovering edge cases.
  3. Improved Fuzzing Coverage:

    • The use of variable-length strings is applied across all test cases in the runTest method (put, get, getKey, removeValue, inverseBidiMap). By introducing more variability in the input size, the test now covers a wider set of scenarios, ensuring a more thorough fuzzing process.

Copy link

Shivam7-1 is a new contributor to projects/apache-commons-collections. The PR must be approved by known contributors before it can be merged. The past contributors are: DonggeLiu, henryrneh, fmeum, aschaich

@Shivam7-1
Copy link
Contributor Author

Hii @DonggeLiu Could Team Please Review This PR
Thanks

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.

1 participant