> For the complete documentation index, see [llms.txt](https://knowledgebase.autorabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-analyzer/source-code-analysis/code-analysis-in-studio.md).

# Code Analysis in Studio

{% hint style="warning" %}
Before analyzing the source code in Studio, make sure you have either

* Installed and configured IZ Analyzer - [Anypoint Studio Plugin](/product-guides/integral-zone/iz-suite/iz-scan/anypoint-studio/installation/install-iz-analyzer-studio.md).
* Installed and configured IZ Analyzer - [WSO2 Integration Studio Plugin](/product-guides/integral-zone/iz-suite/iz-scan/anypoint-studio/installation/install-iz-analyzer-studio.md).
  {% endhint %}

### On The Fly Results:

**`On The Fly Results`** table/view will display the issues related to the project that user is working on. Project is determined based on the current active file (i.e. the file that user is working on) in Anypoint Studio.

Issues will be detected and reported as and when the connectors are configured in the editor. With this, the issues can be fixed even before they exists.

Follow the below steps to explore **`On The Fly Results`** view.

1. Go to **`Window`** -> **`Show View`** -> **`other`** -> **`IZ Analyzer`** -> select **`On the Fly Results`** <br>

   <figure><img src="/files/G0uZ2aAAWXqM6LxFCgqK" alt=""><figcaption></figcaption></figure>
2. Open any mule project xml, the issues will be automatically detected and the results can be seen in **`On the Fly Results`** panel. <br>

   * NOTE: **`On The Fly Results`** scans the whole project corresponding to current mule project xml and displays the results

   <figure><img src="/files/3DtGzWYMeD1lCeAx5KVl" alt=""><figcaption></figcaption></figure>

### On The Fly Results Tab Features

The Results tab provides options such as start or stop analysis, sync rules from the server, reload on the fly results and helps us to quickly sort through the results based on file type, component type and severity.

1. Go to **`Window`** -> **`Show View`** -> **`other`** -> **`IZ Analyzer`** -> select **`On the Fly Results`**. The options are displayed at the top right corner. <br>

   <figure><img src="/files/2oYTGlbTR7NWpLrVI5ND" alt=""><figcaption></figcaption></figure>
2. By default the analysis is active and will immediately report any issues it sees fit. Clicking on the **`Stop Button`** will stop the analysis. You can start it at a later time once a part of your development is completed. <br>

   <figure><img src="/files/OcXBIvpsMNwQjV3SoTAo" alt=""><figcaption></figcaption></figure>
3. Your organization might have added new rules or updated the rules in server. By clicking on the **`Sync Rules`** option, you will be importing these updated rules onto Anypoint studio. <br>

   <figure><img src="/files/crmUwd9hWirjoYLbDKze" alt=""><figcaption></figcaption></figure>
4. By Clicking on **`Reload on the fly results`** option, your project will be validated against the rules to refresh the tab so as to display any new issues along with the previously displayed issues. <br>

   <figure><img src="/files/HtIfAZeOaPdMpH2scIfl" alt=""><figcaption></figcaption></figure>
5. The Issues seen in the On The Fly Results tab can be grouped based on file type, component type and severity.
   1. Grouping based on **`File Type`**. <br>

      <figure><img src="/files/1FmDuDHyQYj1tbO4jZ33" alt=""><figcaption></figcaption></figure>
   2. Grouping based on **`Component Type`**. <br>

      <figure><img src="/files/kBdhc7719pLMSvMNbvWA" alt=""><figcaption></figcaption></figure>
   3. Grouping based on **`Severity`**. <br>

      <figure><img src="/files/rMn8giWbR5UaV0AsL6AB" alt=""><figcaption></figcaption></figure>

### Issue Fix Recommendation

**`On The Fly Results`** precisely point out the problem in each file with line number, but many users might not be aware of issue fix.\
Issue fix recommendation helps to deal with this scenario with detailed description and examples on how to fix the issue.

1. Double click on any issue that need a fix to open up the **`Rule Description`** view. <br>

   <figure><img src="/files/6beVEGpuPs425wGn6XHj" alt=""><figcaption></figcaption></figure>
2. **`Rule Description`** view provides information about:
   * Type of Issue. E.g.: **`Code Smell`**, **`Bug`**
   * Detailed description of the violated rule/issue
   * Non Compliant Code Example
   * Compliant Code Example, which guides developers on how to fix the issue
   * Optionally, an external link to any official documentation for further information about the fix

### Upload to Server

After development is complete, users might want to upload the project to server and save the analysis results or for any other purposes.\
IZ Analyzer provides an easy option to upload project to server from Anypoint Studio.

{% hint style="info" %}
This step assumes that the server details are configured well in advance as mentioned in Installing Studio Plugin SonarQube version 9.x and above requires Java version 11 to scan the projects. It is recommended to use Anypoint Studio version greater than 7.9.0 to use this feature with latest versions of SonarQube.
{% endhint %}

1. Right click on the project that needs to be uploaded to server, click on **`IZ Analyzer - Server Upload`** <br>

   <figure><img src="/files/OGZgRs4EL00RsxQx086L" alt=""><figcaption></figcaption></figure>
2. Fill in the values required for server upload and click on **`Finish`**:
   1. Project Key - Unique key of the project
   2. Project Name - Display name of the project
   3. Project version - Version of the project
3. Detailed logs of upload/scanner process will be displayed in **`console`** view\
   &#x20;

   <figure><img src="/files/RKwW5UvpZIwINdV9KaGU" alt=""><figcaption></figcaption></figure>
4. Results of analysis can be further explored in <https://analyzer.integralzone.com/IZ> Analyzer] dashboard<br>

   <figure><img src="/files/tmVj5tmaSEiLjt4qLxU7" alt=""><figcaption></figcaption></figure>

### See Also

* [Code Analysis In Server](/product-guides/integral-zone/iz-analyzer/manage-server-plugin/install-server-plugin.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-analyzer/source-code-analysis/code-analysis-in-studio.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
