I'm trying to find a diff in obfuscated code which means that names of variables/functions can be different for the same code.
Here's an example:
Code A:
function A(a) {
var b = a * 4;
console.log(b);
}
Code B:
function B(b) {
var c = b * 4 + 2;
console.log(c);
}
So, the only diff I would like to find between these portions of code is just + 2
part and not diff in names of function and variables.
As mentioned by @blex in comment, variables/functions names don't matter but logic change does matter. So, here's another example:
Code A:
function A(a,b,c) {
return a * b + c;
}
Code B:
function B(x,y,z) {
return y * z + x
}
In this example I would like to see the difference: a * b + c
=> y * z + x
.
Is this possible to do somehow?