Chapter 6. Running an analysis and resolving issues


After you complete the configurations, the next step is running an analysis to identify the issues in the code and generate suggestions to resolve the issues. You can get suggestions to fix code by using Red Hat Developer Lightspeed for migration toolkit for applications.

When you run an analysis, MTA displays the issues in the Analysis Results view.

When you request code fix suggestions, Red Hat Developer Lightspeed for MTA performs the following tasks:

  • Streams LLM messages that describe the issue description, resolution, and the file in which the updates are applied.
  • Generates new files in the Resolutions pane. These files have the updates to the code to resolve the issues detected in the current analysis. You can review the changes, apply, or revert the updates.

If you apply all the resolutions, Red Hat Developer Lightspeed for MTA applies the changes and triggers another analysis to check if there are more issues. Subsequent analysis reports fewer issues and incidents.

6.1. Running an Analysis

You can run a static code analysis of an application with or without enabling the generative AI features. The RPC (Remote Procedure Call) server runs the analysis to detect all issues in the code for one or more target technologies to which you want to migrate the application.

Prerequisites

  • You opened a Java project in your VS Code workspace.
  • You configured an analysis profile on the MTA Analysis View page.

Procedure

  1. Click the Red Hat Developer Lightspeed for MTA extension and click Open MTA Analysis View.
  2. Select a profile for the analysis.
  3. Click Start to start the MTA RPC server.
  4. Click Run Analysis on the MTA Analysis View page.

When you request code resolutions by enabling the Solution Server, an issue displays the success metric when the metric becomes available. A success metric indicates the confidence level in applying the fix suggestion from the LLM based on how many times the update was applied in past analysis.

You can review the code updates and edit the suggested code resolutions before accepting the suggestions.

Prerequisites

  • You opened a Java project in your VS Code workspace.
  • You configured a profile on the MTA Analysis View page.
  • You ran an analysis after enabling the Solution Server.

Procedure

  1. Review the issues from the Analysis results space of the MTA view analysis page by the following tabs:

    1. All: lists all incidents identified in your project.
    2. Files: lists all the files in your project for which the analysis identified issues that must be resolved.
    3. Issues: lists all issues across different files in your project.
  2. Use the Category drop down to filter issues based on how crucial the fix is for the target migration. You can filter mandatory, potential, and optional issues.
  3. Click Has Success Rate to check how many times the same issue resolution was accepted in previous analysis.
  4. Click the solution tool to trigger automated updates to your code. If you applied any category filter, code updates are made for all incidents, specific files, or specific issues based on the filter. Red Hat Developer Lightspeed for MTA generates new files with the updated code.
  5. Review and (optionally) edit the code.
  6. Click Apply all in the Resolutions pane to permanently apply the changes to your code.

6.3. Generating code resolutions in the agent mode

In the agent mode, the Red Hat Developer Lightspeed for MTA planning agent creates the context for an issue and picks a sub-agent that is most suited to resolve the issue. The sub-agent runs an automated scan to describe how the issue can be resolved and generates files with the updated resolutions in one stream.

You can review the updated files and approve or reject the changes to the code. The agent runs another automated analysis to detect new issues in the code that may have occurred because of the accepted changes or diagnostic issues that your tool may generate following a previous analysis. If you allow the process to continue, Red Hat Developer Lightspeed for MTA runs the stream again and generates a new file with the latest updates.

When using the agent mode, you can reject the changes or discontinue the stream but you cannot edit the updated files during the stream.

Prerequisites

  • You opened a Java project in your VS Code workspace.
  • You configured an analysis profile on the MTA Analysis View page.

Procedure

  1. Verify that agent mode is enabled in one of the following ways:

    1. Type Ctrl + Shift + P in VS Code search (Linux/Windows system) and Cmd + Shift + P for Mac to go to the command palette.
    2. Enter Preferences: Open User Settings (JSON) to open the settings.json file.
    3. Ensure that mta-vscode-extension.genai.agentMode is set to true.

      OR

    4. Go to Extensions > Red Hat Developer Lightspeed for MTA > settings
    5. Click the Agent Mode option to enable the server.
  2. Click the Red Hat Developer Lightspeed for MTA extension and click Open MTA Analysis View.
  3. Select a profile for the analysis.
  4. Click Start to start the MTA RPC server.
  5. Click Run Analysis on the MTA Analysis View page. The Resolution Details tab opens, where you can view the automated analysis that makes changes in applicable files.
  6. Click the Review Changes option to open the editor that shows the diff view of the modified file.
  7. Review the changes and click Apply to update the file with all the changes or Reject to reject all changes. If you applied the changes, then Red Hat Developer Lightspeed for MTA creates the updated file with code changes.
  8. Open Source Control to access the updated file.
  9. In the Resolution Details view, accept the proposal from Red Hat Developer Lightspeed for MTA to make further changes. The stream of analysis repeats, after which you can review and accept change. Red Hat Developer Lightspeed for MTA creates the file with the code changes, and the stream continues until you reject the proposal for further analysis.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat