Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Swapping of analysis data mode is enabled by default. In this mode, analysis data is written to disk. Swapping of analysis data uses the same persistent storage and is done in a similar process as incremental analysis. If analysis is run on a large project, the analysis data that represents a semantical model of the analyzed source code may consume all the memory available for running BugDetective. If this occurs, BugDetective will remove from memory parts of the analysis data that are not currently necessary and reread it from disk later.


In general, we recommend running C++test in a large JVM heap configured with the Xmx JVM option. This is to minimize swapping, which results in greater performance.

If sufficient memory is available, swapping of analysis data may be disabled, which may speed up code analysis. For information on how to disable swapping of analysis data please refer to Enable swapping of analysis data to disk bullet in the Performance Tab Options topic.

...

To highlight the source code referenced by a BugDetective violation message, simply double-click that message. An editor will open with the source code corresponding to the violation selected and the flow path highlighted in light blue. Any line at which an exception is thrown is marked with pink. All the lines which are important for the violation (violation cause, violation point, critical data flow) are highlighted in a dark color.


Image Modified


If you want to navigate through the code related to a reported execution path, use the Next Violation Element and Previous Violation Element buttons in the Quality Tasks view toolbar.

...

  • Do not report violations when cause cannot be shown:  Determines whether  BugDetective reports violations where causes cannot be shown.
    Some BugDetective rules require that BugDetective checks all the possible paths leading to a certain point and verifies that a certain condition is met for all those paths. In such cases, a violation is associated with a set of paths (whereas in simple cases, a violation is represented by only one path). All of the paths in such a violation end with the violation point common to all the paths in the violation. However, different paths may start at different points in code. The beginning of each path is a violation cause (a point in code which stipulates a violation of a certain condition later in the code at the violation point). If a multipath violation's different paths have different causes, BugDetective will show only the violation point (and not the violation causes).

    Violations containing only the violation point may be difficult to understand (compared to regular cases where BugDetective shows complete paths starting from violation causes and leading to violation points). That’s why we provide an option to hide violations where the cause cannot be shown.

    See the example below for additional details.

  • Do not report violations whose paths pass via inline assembly code: Prevents the reporting of violations whose paths pass via inline assembly code instructions.Level of reporting similar violations (i.e those that share a violation point, or both the point and the cause): Allows you to determine whether BugDetective reports all the violations that it can find in the analyzed code or if it hides some of them. Available options are:
  • Report all similar violations: Reports all identified BugDetective violations.
  • Do not show more than one violation with the same cause and violation point: Prevents the reporting of duplicate BugDetective violations. Duplicate violations are those that share the same violation cause and the same violation point (even though their flow paths may be different).
  • Do not show more report more than one violation per suspicious point: Restricts  Restricts reporting to one violation (for a single rule) per suspicious violation point. For example, one violation will be reported when Flow Analysis detects a potential null dereference with multiple sources of the null value. When verbosity is set to this level, BugDetective Flow Analysis performance is somewhat faster.
  • Do not report violations whose paths pass via inline assembly code: Prevents the reporting of violations whose paths pass via inline assembly code instructions.

 

Example - Impact of "Do not report violations when cause cannot be shown"

...