I was initially trying to implement a program to detect block moves and this algorithm was doing the same. My aim was to compare two versions of a files and find the differences in both the files, like the insert, delete and 'Move'. I found a Diff program on internet which was quite helpful. I have attached the link below if anyone wants to have a look.
https://svn.apache.org/repos/asf/xml...util/Diff.java