jodavimehran / code-tracker

GNU General Public License v3.0
18 stars 6 forks source link

Incorrect mapping - checkstyle if block (4cbd709) #161

Closed flozender closed 1 year ago

flozender commented 1 year ago

https://github.com/checkstyle/checkstyle/commit/4cbd709c019cf1b69796858506d673f7b66d37c7#diff-b48cc2ff38026f94180847550cd260a0ebefb4a9cb9635e39f5fa2046311d72bR234

Tracking block if(R234) in project Checkstyle and commit 4cbd709, R234 is mapped to ~L479~ L356, but it should be mapped to L424.

tsantalis commented 1 year ago

@flozender

From what I see in the diff (screenshot below) R234 is mapped to L424

L479 is the closing curly bracket of a catch block. There is no way it can be matched with that.

Screenshot from 2023-08-29 07-49-37

flozender commented 1 year ago

@tsantalis Sorry, that is a mistake. It maps with L356. The left block goes on to being mapped with a block on the line L479 in another commit and I mixed up the numbers.

This screenshot was taken after the latest commits to RMiner were pulled.

image

tsantalis commented 1 year ago

After my fix the history starting from https://github.com/checkstyle/checkstyle/commit/4cbd709c019cf1b69796858506d673f7b66d37c7 is as follows

Commit ID: b84b3fd04ad9c45e1466e35b707a2b59f5baf66b Date: 2002-09-24T06:34:11 Before: src/checkstyle/com.puppycrawl.tools.checkstyle.Checker#processNEW(String)$if(479-484) After: src/checkstyle/com.puppycrawl.tools.checkstyle.Checker#processNEW(String)$if(479-484) introduced: added with method