How to view an insertion leakage analysis result

This screen shows insertion/deletion leaks across single or multiple lines between duplicate code pairs using an analysis technique that Sider Scan calls “insertion/deletion leakage analysis”. It is recommended to check insertion/deletion leaks because they may be, for example, unchecked null pointers or forgotten to check flags.

Screenshot of an insertion/deletion leakage analysis result

In the above example:

  • The white background is duplicate code
  • The gray background are areas with different logic
  • The lines highlighted in pink are the lines that were deleted by comparing the left and right duplicate codes
  • The lines highlighted in green are the lines that were inserted by comparing the left and right duplicate codes

In the above example, the IF block from lines 155 to 157 in the left code to confirm that A.shape_.Size() is 0U is missing in the right code. The rest of the lines in the white duplicate code block are almost identical on the left and right (only the template parameters in lines 187 on the left and 162 on the right are different).

In other words, it maybe, either you forgot to include the logic to check the value of A.shape_.Size() in the area highlighted in pink in the left code, or you forgot to include the logic to check the value of A.shape_.Size() in the area highlighted in green in the right code.

In addition, the full path of the source code is displayed in the title section of the left and right codes. In addition, by clicking the “View Details on CI Server” button attached to the analysis result e-mail, you can scroll up, down, left, right, and right in your browser, and open a detailed viewer where you can use text search with CTRL-F.