• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Detect duplicated programs

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I need to develop an application which should get 2 java source code files (ex : file1.java , file2.java) as input and tell whether the 2 files are copied from one another..

this project is for my department, they want to find who are all copying when a programming assignment is given to them.

the copier should not escape if he just adds extra comments, change the variable names, change the position of some codes ex: writing main() at last or at the beginning etc..

i am looking for a best algorithm to solve this problem..

please help me by your valuable suggestions.. Any help in this regard is greatly appreciated. please post whatever idea comes to your mind..

Thanks for your help.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

the copier should not escape if he just adds extra comments, change the variable names, change the position of some codes ex: writing main() at last or at the beginning etc..


When is it going to fail then ??
 
Marshal
Posts: 76450
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Such applications are already available; we use one here at Teesside. Would you like me to find out what it's called?
 
Sitrarasu Jayaraman
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Christophe Verré

The condition will fail if they the logic used is different, or the coding style is different.

It should report if someone exactly replicates the logic but changes the variable names and add extra space and comments to escape from the fast inspection nature of the human(i.e the staff members)

And i believe if someone can change the programming constructs altogether, then he need not be considered as a copier. because the assignment is aimed at checking his/her programming ability, so when he can change the constructs used in the program altogether then that should be fine..
ex:


Note: it would be fine if our application could detect the similar flow like the following, i.e just changing the looping construct but rest of them remains the same.
ex:


 
Sitrarasu Jayaraman
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Campbell Ritchie,

That would be helpful to me, if you could do that..

looking forward to your help.

Thanks.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try google "java code plagiarism analysis"

there are several tools/tecniques

TIA

Leo K.
 
Campbell Ritchie
Marshal
Posts: 76450
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So sorry; I forgot to ask. I went round today, and haven't yet found anybody who knows. I shall try to remember to ask again next week.
 
Campbell Ritchie
Marshal
Posts: 76450
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is called Turnitin.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic