In the following flow some issues are kept open instead of being closed:
1. first analysis detects four issues on the same rule, for instance because the diamond operator <> is not used:
2. edit code to fix the 3 last issues and keep the first one open. The issues must move to different lines, for example by inserting a comment at the beginning.
3. trigger a new analysis. The 3 issues which are supposed to be fixed remain open and are not closed. The first issue is correctly matched with the existing one.
The first step of issue tracking algorithm compares issues that are on the same line number and same line body. Here as lines moved, no issues match.
The second step detects moves of code blocks. When processing the first issue, we search for all the issues that are located in similar code blocks. Here the 4 issues loaded from database successfully match. Obviously only one can be flagged as matched. The bug is that the remaining issues are lost in space instead of being flagged as closed.