Maybe you remember my previous post about detection of copied assignments? Well, now I can say it succeeded. CJuicer is a flex script, generating a lexycal analyzer with a rudimentary parser of C code, it outputs a PostScript with the “logical tree” of loops, function calls and conditionals. Same trees, copied assignment (unless it is a very simple code… then almost everyone writes the same), without problems with changing names of variables.
As I said in a previous post, I am looking for some way to detect copied code. I have now a working prototype of a “code juicer”. From a C file it creates a set of PostScript files (well, almost, as they need postprocessing) which are later processed and selected to print. As an example, here is the output applied to a Runge-Kutta-Fehlberg 4-5.
It is something like an execution tree, with function calls squared, and different slopes for if, for, while clauses.