Moved lines detection
Posted: Thu Jun 19, 2008 11:29 am
Hi,
Here is one more question about moved lines. I know detecting moved lines in source code is not a trivial algorithm, but I hope you can improve it a little.
In my case when I compare two source code files it detects most of moved lines okay, but there are two little problems:
1. If a continuous block of code with several methods (with empty lines between them) was moved, then Compare It detects every method as a separate move block. I would really like to see it as a single move block. That is if I moved 50 lines of code with three methods, then instead of one move block for 50 lines Compare It shows me three separate move blocks.
2. Some lines are not detected as moved. For example, if I moved a whole class down, then it could be that the beginning of the class and the first method are not detected as a moved block.
If you want I can provide my files.
Here is one more question about moved lines. I know detecting moved lines in source code is not a trivial algorithm, but I hope you can improve it a little.
In my case when I compare two source code files it detects most of moved lines okay, but there are two little problems:
1. If a continuous block of code with several methods (with empty lines between them) was moved, then Compare It detects every method as a separate move block. I would really like to see it as a single move block. That is if I moved 50 lines of code with three methods, then instead of one move block for 50 lines Compare It shows me three separate move blocks.
2. Some lines are not detected as moved. For example, if I moved a whole class down, then it could be that the beginning of the class and the first method are not detected as a moved block.
If you want I can provide my files.