15 Mar, 2011, Vigud wrote in the 241st comment:
Votes: 0
Are you referring to the statistics given by KaVir? I don't know how he did it, but here is what I use for similar purpose:
$ diff -Barwidy -W 2 –left-column Merc22/src Envy22/src |grep '(' |wc -l
23319
Two things I should clarify: this is a GNU diff, I don't know if others can do the same. And it gives you number of shared _text_ lines, not lines of code.
15 Mar, 2011, Rarva.Riendf wrote in the 242nd comment:
Votes: 0
I was thinking of something a little more complicated, that would ignore indentation and coding style (by applying one before any comparaison is made, (sure I could do it myself)) cause this is an obvious way to fool common automatic tools, and something even smarter that could do some refactoring of its own if it detects perfectly similar code but with different variables names.
not to mention reordering methods (I move code around a lot)
I actually don't know of any of those kind of tools, and was wondering if any existed.
15 Mar, 2011, Tonitrus wrote in the 243rd comment:
Votes: 0
Rarva.Riendf said:
I was thinking of something a little more complicated, that would ignore indentation and coding style (by applying one before any comparaison is made


indent
15 Mar, 2011, Vigud wrote in the 244th comment:
Votes: 0
Rarva.Riendf said:
I was thinking of something a little more complicated, that would ignore indentation and coding style (by applying one before any comparaison is made, (sure I could do it myself)) cause this is an obvious way to fool common automatic tools, and something even smarter that could do some refactoring of its own if it detects perfectly similar code but with different variables names.
I agree that my solution can be fooled, but dude, it is complicated. Read about every single option I used and you'll see that yourself. I know you haven't yet, because you don't know it already ignores whitespace. And yes, indent can help a little bit in this case (unlike when you want it to produce nice looking code). Other than that, I don't know any tools to do what you want. You could try comparing binaries.
15 Mar, 2011, David Haley wrote in the 245th comment:
Votes: 0
There are tools that look at control flow and anonymize variables, and so forth. Universities use them to detect cheating in programming assignments. I don't know of URLs or if they're available for free, but such things exist. Doing text analysis is certainly not a very good way of doing this. I'd start searching for static analysis, program structure comparison, etc.
16 Mar, 2011, Cratylus wrote in the 246th comment:
Votes: 0
David Haley said:
I'd start …analysis


lol
16 Mar, 2011, David Haley wrote in the 247th comment:
Votes: 0
Why you so mad tho?
16 Mar, 2011, sankoachaea wrote in the 248th comment:
Votes: 0
MSVC can help a lot with this actually.

Also, and I know this is not ideal but autodoc+diff can wrk to give similar indications (quick 'n dirty)
16 Mar, 2011, oenone wrote in the 249th comment:
Votes: 0
Rarva.Riendf said:
I was thinking of something a little more complicated, that would ignore indentation and coding style (by applying one before any comparaison is made, (sure I could do it myself)) cause this is an obvious way to fool common automatic tools, and something even smarter that could do some refactoring of its own if it detects perfectly similar code but with different variables names.
not to mention reordering methods (I move code around a lot)
I actually don't know of any of those kind of tools, and was wondering if any existed.


there are tools. just google for "clone detection".
16 Mar, 2011, KaVir wrote in the 250th comment:
Votes: 0
Vigud said:
Are you referring to the statistics given by KaVir? I don't know how he did it,

It was just a diff - as I explained at the time, "my statistics are heavily biased in favour of Medievia - even a tiny change will register as a fully original line of code".

To be honest that just made it all the more incriminating, particularly when you've got files like this, this and this.
16 Mar, 2011, Rarva.Riendf wrote in the 251st comment:
Votes: 0
Quote
To be honest that just made it all the more incriminating, particularly when you've got files like this, this and this.

Indeed.

And btw, it was just 'for fun' heh, if you do not have a solution like 'use this tool' it is already too much work I want to pour in. I thought some stuff like that would exist made by some GNU ayatollah to look into GPL viloation :p

Quote
I agree that my solution can be fooled, but dude, it is complicated. Read about every single option I used and you'll see that yourself. I know you haven't yet, because you don't know it already ignores whitespace.

As I said already whitespace and indent would be the least of my concern as I have code style I can apply, so it would mofify even brace location…I wanted an 'automated tool'…not some poor man solution (I use CVS plugin for eclipse for that…) The hint about universities checking for stuff like that tells you those should exist…just that the tools maybe not free (as in beer)
16 Mar, 2011, oenone wrote in the 252nd comment:
Votes: 0
this is a clone detector for C/C++ assemblies: http://www.swag.uwaterloo.ca/acd/

the wikipedia page for "Duplicate code" links a few tools, too.
26 Mar, 2011, Kanzel wrote in the 253rd comment:
Votes: 0
I don't know if it's illegal, but I do know that any mud that accepts donations and gives in-game perks in exchange is a game I'm not going to play, and I take a similar view with "free" games that require some method of payment to actually compete. It presents balancing issues between players when these perks are useful, and makes absolutely no sense where a roleplaying-enforced setting is concerned. Either the game is free and you put forth effort and time to reach the goal, or the game is commercial and you do the same. There's no in-between in my opinion.
27 Mar, 2011, David Haley wrote in the 254th comment:
Votes: 0
Taking donations in exchange for goods is pretty clearly against the letter and spirit of the Diku license, not to mention oxymoronic in the first place.
240.0/254