From: Method-level code clone detection through LWH (Light Weight Hybrid) approach
Source code(a) | Type-1 clone(b) | Type-2 clone(c) | Type-3 clone(d) | Type-4 clone(e) |
---|---|---|---|---|
int main() { int x = 1; int y = x + 5; return y; } | int main() { int x = 1; int y = x + 5; return y;//output } | int func2() { int p = 1; int q = p + 5; return q; } | int main() { int s = 1; int t = s + 5; t = t/++s; return t; } | int func4() { int n = 5; return ++n; } |