I've recently been accused of plagiarism on one of my university modules and I wondered if I could get some educated input on things.
The code highlighted in red is the same in both our submissions.
I was wondering if anyone could think of reasons that 2, in around 100+ students could not both have come up with the same solution.
- All variable names were all taken from example/base code
- The intended function of the program was a virtual house tour sim that ran in the command prompt
- Both had access to the same learning resources/reading list
Any input would be massively appreciated!
Thanks in advance,
Well.. this does look like copying to me, with little changes sprinkled as an afterthought.
Coding something non trivial is often like writing poetry, this kind of similarity does not arise by accident often, if not ever.
I find it hard to believe that you both used the same (inefficient) method for comparing strings. I would think that at least one of you would have figured out that using:
is greatly more efficient than doing two strcmp() calls.
if (tolower(*Direction) == 'q')
Using the same algorithm is very common, but implementing the algorithm this closely in code, shows either a common source was used (perhaps something from the lecture or reading list), or copying. The resemblance is quite uncanny.
Is this code quite similar to something in your lecture notes or reading list?
It would be instructive to see what the other students assignment have in duplicate (or near duplicate), code.
One problem is how easily someones work can be taken, completely without their knowledge.
One of them looks a lot like this.
Actually, neither of the examples in your picture are this code. It has a function called DescribeExits() (like your left-hand image), but does NOT have a variable called SecondInput. So IMO, the code posted on this forum is a THIRD variant.
I wonder if this person is also in the same class?
There's no shortage of threads with a very similar theme.
> All variable names were all taken from example/base code
Does that mean things like
were all in common code given to all of you as an example to work on?
a) ALL the code for both submissions,
b) the boilerplate example you were all given as a starting point,
it's hard to make any kind of judgement. I mean, if you're stuck with a variable called Direction and you only have letters NESW to deal with, it's hard to be uniquely creative.
A bunch of strcmp() calls in <20% of the code base seems hardly concrete proof.
The interesting code (ie, the difficult bit) is going to be in DescribeExits / ShowExits. How do these compare between the two submissions?
If how you deal with how rooms are represented and navigated is different, then I think you have a point to argue with.
Putting both of you separate closed rooms with just an assignment and reference manual would sort it out. Faculty have pretty much shot themselves in the foot if they handed out too much boilerplate code to begin with to make definitive plagiarism assertions over 100+ students.
Was it plagiarism? I get from your wording that this might be the case, but you're trying to get a good excuse from the experts who frequent this board - though I could very well be wrong about this. It's just that I've learned how to carefully read into what people are actually saying based on the words used, and this post raised a few flags for me.
Now you mention it I can't believe this didn't occur to me before. This was my first experience with using the C Language so I was relying heavily on reference (which is most likely what has got me in to this trouble).
Originally Posted by memcpy
Hopefully we all made this error based on something found in the lecture notes and not elsewhere!
They are in the same class, I think the same assignment has been running for some years now.
When we were given the assignment we were given an .exe of an example program which took in [n, e, s, w, q] inputs and navigated around a house as well as base code for setting up the rooms/defining variables/partial main function.
We were basically told "if you reproduce this like for like you'll get a B, add anything extra to get an A".
This is the only code of the other students that I have been given to show plagiarism so I'm assuming that there are no other similarities.
There is such a thing as weighting by value of the perceived copy, and the red bits have no value. They are purely functional and obvious.
If that is all there is, even if it was intentional plagiarism, tell them to suck the excrement from a donkeys southern most end.
If the example was given to check for a series of conditions that aren't integer in nature everyone would follow the same pattern because that's the most savory option.
That's a perfectly natural bit of C++.
else if (condition_2)
If the variable names and interface are imposed the only thing left to consider is spacing.
If on the other hand you lied about what was imposed, you better start looking for the original the several of you (As Salem notes, there is more than two variations on this code on the web.) copied and start figuring out exactly what is different so you can decide if anything you did create has a value due to the arrangement and implementation of code.
Matticus: Although I have started to question myself after the allegation (whether or not I saw the code on a forum like this) , at no point during the assignment did I see the other persons code and I'm pretty sure my code never left my laptop before it was submitted. I definitely didn't directly copy-paste any code snippets either. I've been trying to write in a way that doesn't create too much bias on one way or another because it's not you guys that I need to convince.
phantomotap: I might leave out the bit about the donkey in my response but you've given me some stuff to think about, thanks.
Put it this way: those two segments of code use the same (inefficient in this case) coding of the same algorithm, follow the same convention for variable naming, use EXACTLY the same variable names, and follow the same guidelines for code indentation. The only observable difference is in comments, which are easily added, edited, or removed without impacting the code.
In some rare professional settings, code is automatically fed through a separate program that enforces particular coding styles, and even conventions for variable naming. Well known quality algorithms are sometimes reused, or even reimplemented (unless a code review identifies the duplication). Even in those settings, it is exceedingly rare for two different programmers to select exactly the same variable names and same coding techniques in large parts of their code, simply because those things reflect the mind of the programmer on a given day. And the mindset of programmers change day to day, due to stress levels, fatigue, family frustrations, and other things.
While it is not absolutely 100% certain that two independently written code fragments can be almost identical, it is a fair bet that the two code fragments are copied from a common source. The fact that the differences are minor (comments, a variable name or two, a couple of strings) doesn't change those odds much - the odds are still vastly in favour (much closer to 100% than to 50%) of someone deliberately attempting to obfuscate the fact they have copied the code.
The fact there are multiple similar looking variants on the web increases the odds of a common source even further.
So, in the end, given the information in this thread, I would conclude the call of plagiarism is valid. There is a very small (near zero) probability of my conclusion being wrong. That doesn't pass the legal test (in various jurisdictions) of what a "reasonable person" would conclude, given the same body of evidence.
Well since you're a smart guy you're just gonna send them all previous revisions of the code from your SVN/Git Repo, and then they can follow the code as it's being written and see that you came up with it yourself.
You did use version control right?