terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

How to determine the code duplication? #204

Closed cyw3 closed 6 years ago

cyw3 commented 6 years ago

How to determine the code duplication??

I guess:

  1. tokens's hashcode 2.code's AST
penguish commented 6 years ago

Rabin-Karp algorithm? There is some overlap with plagiarism detection:http://www0.cs.ucl.ac.uk/staff/j.krinke/publications/scam16.pdf