In this section:

Introduction

The Static Analysis Hotspot slice determines which code analysis violations stem from the same flow trace source and reports the sources as “hotspots”. By default, a flow trace source is considered a hotspot when it results in at least five (5) violations, but you can configure the threshold in the widgets shipped with the slice.

Requirements

  • This artifact can be installed on DTP 2020.1
  • Flow analysis reports from C/C++test, dotTEST, and Jtest 2020.1 are supported. 

Installation

The Static Analysis Hotspot slice is installed as part of the Process Intelligence Pack. See the Process Intelligence Pack Installation instructions for details. After installing the slice, deploy the widgets and report to your DTP environment. 

  1. If you have not already done so, install the Process Intelligence Pack.
  2. Open Extension Designer and click the Services tab.
  3. Expand the Process Intelligence Engine service category. You can deploy assets under any service category you wish, but we recommend using the Process Intelligence Engine category to match how Parasoft categorizes the assets. You can also click Add Category to create your own service category (see Working with Services for additional information). 
  4. You can deploy the artifact to an existing service or add a new service. The number of artifacts deployed to a service affects the overall performance. See Extension Designer Best Practices for additional information. Choose an existing service and continue to step 6 or click Add Service.
  5. Specify a name for the service and click Confirm.
  6. The tabbed interface helps you keep artifacts organized within the service. Organizing your artifacts across one or more tabs does not affect the performance of the system. Click on a tab (or click the + button to add a new tab) and click the vertical ellipses menu.
  7. Choose Import> Local> Flows> Workflows> Process Intelligence> Static Analysis Hotspot and click anywhere in the open area to add the artifact to the service.
  8. Click Deploy to finish deploying the artifact to your DTP environment.
  9. Return to DTP and refresh your dashboard. You will now be able to add the related widgets.

Adding and Configuring the Widgets

After deploying the artifact, the Violations from Hotspot - Percentage and Violation Hotspots - Pie widgets will be available in DTP under the Process Intelligence category. See Adding Widgets for instructions on adding widgets to the dashboard.

Violations from Hotspot - Percentage Widget

This widget shows the percentage of violations in the selected build that stem from hotspots. It also shows the number of hotspot-related violations and the total number of violations in the build. 

Click on the widget to view the hotspot in the Violation Hotspots Report.

Configuration

You can configure the following settings:

TitleEnter a new title to replace the default title that appears on the dashboard.
FilterChoose Dashboard Settings to use the dashboard filter or choose a filter from the drop-down menu (see Creating and Managing Filters for more information about filters in DTP).
Target Build Choose the build containing the data you want to see. Default is Latest Build.
Hotspot ThresholdSpecify the number of violations resulting from the same trace source for the source to be considered a hotspot. Default is 5.

Violation Hotspots - Pie

This widget shows the number of violations resulting from each hotspot in the build.

Each segment in the widget represents a hotspot. You can hover your pointer over a segment to view the hotspot's file name and line number, as well as the number of violations resulting from the hotspot.

 

Click on a segment to view the hotspot in the Violation Hotspots Report.

Configuration

You can configure the following settings:

TitleEnter a new title to replace the default title that appears on the dashboard.
FilterChoose Dashboard Settings to use the dashboard filter or choose a filter from the drop-down menu (see Creating and Managing Filters for more information about filters in DTP).
Target Build Choose the build containing the data you want to see. Default is Latest Build.
Hotspot ThresholdSpecify the number of violations resulting from the same trace source for the source to be considered a hotspot. Default is 5.

Violation Hotspots Report

The Violation Hotspots Report provides details about the hotspots detected in the build. 

Each row represents a hotspot and shows the following information:

  • Hotspot column: Shows the flow analysis trace message.
  • File column: Shows the file where the trace started.
  • Line column: Shows the line number in the source file that marks the start of the trace.
  • # of Violations column: Indicates the number of violations in each hotspot.  
  • Score column: Each violation from a hotspot is assigned a value based on the severity of the violation. The score is the sum of these values for the hotspot and is assigned using the following heuristic:
    • Severity 1 (critical) violations are assigned a value of 10 
    • Severity 2 (high) violations are assigned a value of 4 
    • Severity 3 (medium) violations are assigned a value of 2 
    • Severity 4 (low) violations are assigned a value of 1 
    • Severity 5 (info) violations are assigned a value of 0 

Expand a hotspot row to view the following information:

  • The start of the trace appears above the nested table.
  • File column: Shows the file containing the violation. Click on a link in this column to view the violation in the Violations Explorer.
  • Rule column: Shows the flow analysis rule ID.
  • Line column: Shows the line number where the flow analysis violations was reported.
  • Severity column: Shows the severity of the violation. 
  • No labels