I'm currently working on a legacy java code which was written with almost no coding conventions or common practices. I often come across working but very lousy code snippets (typos in variable names, redundancy and many others) that I find myself urging to fix. In one of those instances, I've found a class that contains three methods with different names but almost identical method bodies.
As per my initial observation, the only difference was the name of one of the parameters.
Before taking any steps and merge them though, I wanted to make a comparison of three methods to see if there's any subtle difference that I didn't notice.
I know it's possible to compare two files, compare with the version from VCS etc. but I was not able to find a quick way to compare the method definitions in the same file.
Is there a more practical way to compare different sections of the same file in IntelliJ rather than copying them into different files and run a file comparison?
Thanks,