Comparing Analyses
Last updated
Last updated
When making changes to a branch, it can be valuable to compare the impact of those changes relative to earlier versions of the branch, or of other branches. The Show Comparisons feature helps you to do that.
When you click on the Review button from the Navigator Home page, a new tab opens to the Summary page as described in Reviewing Your Results. Noted in that section was the button labeled Show Comparisons. This allows you to compare this analysis with another one done previously.
To compare this session's results with a previous analysis, click on the Show comparisons button to bring up the list of other possible branches against which to compare. For our examples here, we are only showing one other option, but the list would contain a list of all possible branches for comparison. For Python and the django
project, let's look quickly at the summary page for the alternate analysis.
The summary shows that a separate analysis for the stable/2.0.x
branch has a different number of detected bugs. In this case there are 42 bugs detected. Some may also be found in the other analysis but some may not. Let's find out.
Starting from the branch that was analyzed earlier, main
in the case of the django
project, clicking on Show Comparisons brings up the list of possible alternate branches. Here we see a single branch available for comparing: the stable/2.0.x
branch.
NOTE: In these examples, the branch from which the comparison is being initiated, main
, is not displayed as an option for comparison. This is either because there are no other analyses to compare with or any previous analyses are from the same version of the code (same commit hash). In these cases, since there is nothing to compare, they are not offered.
To choose the alternate branch for comparison, click on the desired branch entry. Since there may have been more than one previous analysis performed on a particular branch, the next step is to choose which analysis session from that branch is desired. Typically, the most recent analysis is offered by default. But you can scroll down through the list to see the various sessions or use the default pull-down menu to search by either session number or date of the analysis.
In this example, we have chosen the stable/2.0.x
branch where there is more than 1 available session. Clicking on the default pull-down menu shows the search options. We'll choose the Search by Session ID to show how this works. We enter 2 in the search field and click Submit. Now, only Session ID 2 shows up. We click on Apply to reveal the comparison.
The comparison view is the same as for viewing the results of a complete analysis as shown in Reviewer Summary and Filters. However, in this case, only the bugs that are disjoint from the alternate analysis are displayed. In our example, we can see the 5 bugs that were recently detected that were NOT in the alternate branch's analysis.
Note that some bugs may have been fixed from the previous analysis. To see those, you may want to perform the comparison in reverse. That is, compare the old analysis with the newer one. That will show you bugs that were in the previous analysis that are no longer in the current one.
The goal of the Show Comparisons feature is to make it easier for a developer to determine if recent changes they have made introduced new bugs from some point in the past.