This topic explains how to generate an AI-suggested fix to a violation and replace your code with the generated code. To use this functionality, the LLM provider must first be configured in the Parasoft Preferences. For details, see Configuring LLM Provider Settings.
This feature depends on LLMs, which may produce inaccurate information.
In the Findings view, right-click the finding you want to generate a fix for, then choose Generate Suggested Fix for [rule].
Note: This feature does not support the CDD and METRIC rules, as well as .properties and .xml files. The Generate Suggested Fix for [rule] option is not available for these items.
AI-generated code and recommendations will appear in the AI Suggested Fix panel.
- To apply the AI-generated solution, click the Apply fix button. A diff view of the code will open, allowing the user to edit the code if needed before appending it to the test class.