Similar code detector
- by Let_Me_Be
I'm search for a tool that could compare source codes for similarity.
We have a very trivial system right now that has huge amount of false positives and the real positives can easily get buried in them.
My requirements are:
reasonably small amount of false positives
good detection rate (yeah these are going against each other)
ideally with a more complex output than just a single value
usable for C (C99) and C++ (C++03 and optimally C++11)
still maintained
usable for comparing two source files against each other
usable in non-interactive mode
EDIT:
To avoid confusion, the following two code snippets are identical and should be detected as such:
for (int i = 0; i < 10; i++) { bla; }
int i; while (i < 10) { bla; i++; }
The same here:
int x = 10; y = x + 5;
int a = 10; y = a + 5;