Fallback Diff segmenting move in large C file.
Describe the Bug I am using the VS Code extension to look at a C File. The move detection seems to be working, however it is segmented into almost every single line which pollutes the view. The files I am looking at are almost 4000 lines, and this seems to work correctly when I copy a small snippet of about 50 lines out
To Reproduce Steps to reproduce the behavior:
- Start with (c) file that has 4000 lines
- Move large chunks of the lines (500-1000) and save as new file
- Open a diff for both files
- See error
Expected Behavior
Expect the moves to be in contiguous blocks
Actual Behavior each line is an individual move
Screenshots
Source Code Sorry, I can't share any more code.
SemanticDiff Version v0.9.0
VS Code Information Version: 1.95.3 (user setup) Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813 Date: 2024-11-13T14:50:04.152Z Electron: 32.2.1 ElectronBuildId: 10427718 Chromium: 128.0.6613.186 Node.js: 20.18.0 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.22631
Additional Context Add any other context about the problem here.
Actually, here are 2 files with some copilot-generated code that shows the same behavior.
copilot_test.zip
Hello @bbbecker,
Thanks for reporting this issue!
The main reason for the poor quality of move detection is that C/C++ support is still missing, so there is basically no "structure" to consider when matching lines. For supported languages, the quality of the matches should be much better.
I'm currently working on improvements for move detection and will look into this as well.
Best Regards, Sebastian