<blockquote>
<p>What to tell students that plagiarised their programming assignment?</p>
</blockquote>
<p><a href="https://honesty.uark.edu/policy/index.php#sanction-rubric" rel="nofollow noreferrer">Where I went to school</a>, one would tell the students, <em>&quot;You have now received a grade of</em> F <em>for this course. For this violation of the University's Academic Integrity Policy, you have been given 1.0 sanction points. An accumuation of 1.5 sanction points will result—depending on the circumstances—in your suspension or expulsion from this school.&quot;</em></p>
<blockquote>
<p>How can I prove plagiarism?</p>
</blockquote>
<p>At my school, the standard is Preponderance of Evidence, which means <em>&quot;evidence...of greater weight...than evidence to the contrary&quot;</em>.</p>
<p>So it's your evidence against theirs (and if they're relying on a 1-2% difference in word choices as their evidence, then I pity them).</p>

CC BY-SA 4.0
2022-02-05T08:57:06.703Z
2022-02-05T08:57:06.703Z
J. Berry
<p>As a TA you are working for a professor. They are fundamentally responsible for grading. It would have been better had you checked with the prof before assigning grades and getting advice. But what you did is reasonable.</p>
<p>I think you are covered on proof, given that you took screen shots. But it is the prof who will decide on how to handle the complaints. If they behave well they will back you up, though possibly with accommodations. But let the prof decide, with your advice. Don't try to take too much responsibility for the outcome.</p>
<p>Long term, the prof might think about not giving assignments that can be easily plagiarized, but that isn't your responsibility.</p>
<p>As for helping them, they need a good and proper definition of plagiarism and and explanation of why it is wrong, both ethically and pedagogically. They have failed to learn something as well as crossed an ethical line.</p>
<p>A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade.</p>
<p>So, you need to bring it to the prof's attention. In some large classes with many TAs there is a &quot;head TA&quot;. In that case, bring it to them first as they likely have more experience than yourself.</p>
<p>The complaints, themselves, those already posted and future ones, should be referred upwards also.</p>

CC BY-SA 4.0
2022-02-02T15:08:09.460Z
Thank you for your answer. I already submitted my comments to my supervisor. I'm not sure what will happen next, but I hope the other students don't complain too much.
Marcus
CC BY-SA 4.0
2022-02-02T15:15:08.293Z
@Marcus Follow your supervisor's lead, and don't worry too much about the complaints.  Run responses by your supervisor before you send them out, and make sure that they are present at all meetings.  If a student corners you, tell them that you would be happy to schedule a meeting to discuss it.  The only way you can get yourself into hot water here is if you don't follow your supervisor's lead.
Ben I.
CC BY-SA 4.0
2022-02-03T00:27:56.123Z
It's worth also noting that plagiarism specifically & usually [everywhere I've been] falls under Academic Misconduct policies. As such it likely has explicit policy based guidelines for proper handling; for example, for my institution, there's an entire flowchart: https://www.montana.edu/deanofstudents/academicmisconduct/academicmisconduct.html . So, @Buffy definitely has the best way to handle this in the future: to pass your suspicions and related documentation/evidence back to the professor to handle at their discretion, rather than assigning a grade yourself based on suspected plagiarism.
taswyn
CC BY-SA 4.0
2022-02-03T15:14:14.710Z
At my undergraduate university, a first infraction would result in an automatic 0 for *the entire course*.
EJoshuaS - Stand with Ukraine
CC BY-SA 4.0
2024-05-16T12:42:14.690Z
I am very much surprised that I so frequently see suggestions such as "*A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade*". In my POV, this basically tells students that it's free to cheat - if they don't get caught, they receive a positive grade. If they do get caught, then they can start doing honest work. I feel like this does not value the tutors' time. One may say that students only cheat themselveses while cheating in order to obtain a passing grade, but...
Fureeish
CC BY-SA 4.0
2024-05-16T12:47:12.630Z
...but it omits the fact that some universities are respected for their alumni's skills. If *the field* starts being flooded by incompetent alumnis because the university did not care enough to catch (at least some) cheaters, it loses credibility. This may not be a big issue for some, but for other faculties this is quite crucial. What's more, I find that many honest students get heavily discouraged when cheating is being ignored. They feel like it's not worth it to be honest. This is, of course, not true, but I do not believe that it would be easy to change their approach / feelings.
Fureeish
CC BY-SA 4.0
2022-02-02T13:29:13.620Z
2022-02-02T14:54:02.127Z
2022-02-02T14:54:02.127Z
Buffy
<p>There is a point where you should award some marks for the code being complete and producing the output. If the code is only part of the assessment and the student was not capable of writing it themselves, then the other elements are likely to be of low quality. It is reasonable to assume that <em>correct</em> code in many cases <em>should</em> look similar, so to award a <em><strong>Zero</strong></em> would mean you are certain that plagiarism or collusion has occurred, in which case you should have no problem defending your assessment.</p>
<p>Most institutions would have a clear policy around plagiarism, if you have such a policy then when there is a dispute or challenge to your assessment on the grounds of plagiarism you need only to remind the students of the policy, that policy should guide you on both how it is detected and what the penalties are.</p>
<ul>
<li>If you do not have a policy on plagiarism, then be sure to establish one, even if it is a preference that might be hard to enforce, make it clear <em>before</em> the assessment task that plagiarism and collusion are not going to be tolerated.</li>
</ul>
<p>One strategy to discourage plagiarism in programming is to encourage creativity, by requiring students to design their own models and scenarios and even the test harnesses to demonstrate certain techniques. It takes a lot of work, and you can't rely as much on automation for reviews, but even if the students source blocks of logic from SO or each other, if the models they are applying the logic to are unique then they will still have to understand the code to make it work.</p>
<p>You can also complete an assessment over time, or turn submission into more of a folio of work, apart from making it easier to detect plagiarism as the complexity of the assessment content goes up, you can lower the bar in terms of effort required by the student, especially if there is a chance to complete the tasks during class times.</p>
<p>As to how to help the students improve when they are caught out, give them the opportunity to re-submit, but this time give them a <em>different</em> assessment item. With different requirements they can not simply re-write the syntax from the previous submission, they will be forced to think about it even if they are going to apply some or all of the code in the first assessment.</p>
<ul>
<li>A simple trick here is to change the subject or topic of the content. This will actually help you identify if they understand the difference between encapsulating abstract concepts and the business domain concepts.</li>
</ul>
<hr />
<p>Whilst facetious, it must be recognised that the point of learning is not to re-invent everything, but that we should continue to evolve and build upon established concepts. This is true for programming as much as other domains. The reality of how programming is applied in commercial contexts is that there is a lot of skill in locating and understanding the correct pattern or solution to apply to a logical problem domain and how to implement it correctly.</p>
<ul>
<li>In layman's terms this is effective use of <code>Cut'n'Paste</code></li>
</ul>
<p>A good developer does not re-invent the wheel, they determine how to fit the a standard wheel implementation into their model.</p>
<blockquote>
<p>I can't help but share <a href="https://stackoverflow.blog/2019/12/19/what-senior-developers-can-learn-from-beginners/?cb=1&amp;_ga=2.139093171.1049773760.1643802433-513005019.1591708658">my favourite quote from Eric Lippert</a>:<br />
<em>The notion that programming can be principled — that we proceed by understanding the abstractions afforded by the language, and then match those abstractions to a model of the business domain of the program — is apparently never taught to a great many programmers. Rather, many programmers proceed as though they’re exploring an undiscovered country, and going down paths more or less at random and hoping they end up somewhere good, no matter how twisted the path is that gets them there.</em></p>
</blockquote>
<p>It is true there may be a unique solution to every problem, the construct of institutionalized education is such that many problem statements used in assessments have been used before, so avoiding plagiarism from sites like SO would require your assessment criteria itself to unique. Try assessing Fizz-Buzz in a room of students with no external communications, depending on how you have taught the concepts there is likely to be a strong commonality in the style, layout and logical expressions utilised to produce the result. Programming is <em>very</em> logical, just like mathematics there are <em>right</em> answers and many that are clearly <em>wrong</em>. But the processes used to work out the result will be influenced by the tuition and other experiences of the student, if all their experiences and learning is shared or taught from a common source, then it makes sense that the outcomes would be similar from students across a class or cohort.</p>
<p>Although not very practical, to determine plagiarism, you should be looking for the personal quirks of one student to be reflected in the others, try comparing the mistakes or omissions, as opposed to the correct elements. Or the reverse, that the quirks of the submission are not consistent with any previous work from that same student. If in the other elements the student has demonstrated a genuine understanding of the code, and an ability to recreate it if given ample opportunity, then whilst you can disapprove of it, without stronger grounds or investigation it should be marked according to its content.</p>

CC BY-SA 4.0
2022-02-03T04:59:06.277Z
V good answer. I was thinking of making similar but thought it too scandalous. Copying/non-reinventing  is a software-engineering **positive**. (Modulo licences etc) It's deleterious effects are remote from morality -- student is **evil**. More of a logistical question : In the face of copying how to evaluate/grade? Once that is recognized the next step is patent : copying represents not failure of student but of system. Dijkstra said it; I've generally followed: One big reason to eschew mainstream omnibus languages is precisely to obviate the *cut-paste from stackoverflow* bug
Rushi
CC BY-SA 4.0
2022-02-03T05:41:14.143Z
I liked the quote in ur profile: Don't reinvent the wheel, realign it! That said the teacher's task is non trivial. Children need to reinvent... Electrical with mechano, buildings with Lego .... They need to step thru Pythagoras' proof even if that doesn't make them Pythagoras. Not invalidating any of above. Just reasserting: To he effective, academics needs to be in a walled garden; not just evaluating but teaching also
Rushi
CC BY-SA 4.0
2022-02-03T06:27:02.940Z
It was too hard to escape the irony of learning to NOT copy code, only to find commercially it is practical on a number of levels to copy existing documented code patterns. Realistically understanding how to research APIs and best practices and when to copy code can be a great skill itself.
Chris Schaller
CC BY-SA 4.0
2022-02-03T16:01:59.907Z
@ChrisSchaller I've actually had a senior officer in the company ask me why programmers were writing their own code and not just copying it off the internet.
Dragonel
CC BY-SA 4.0
2022-02-03T04:12:58.520Z
2022-02-03T06:21:28.323Z
2022-02-03T06:21:28.323Z
Chris Schaller
<p>While there are an infinity of ways to write code that accomplishes any task, in tasks simple enough for labs, there are usually only two to four <strong>reasonable</strong> approaches for each step, and certain amounts of fluency in coding practice will tend to bring approaches even further in line.</p>
<p>So, in a lab project that has, say, three essential steps to it, there will be something like eight to sixty-four reasonable approaches to the whole thing.  If even one of the steps only has two reasonable approaches, then you'll be down to sixteen reasonable approaches at the maximum.  You're well into the territory in which you should see some <em>very</em> similar student responses, even if everyone is doing their own work.</p>
<p>Even with a fairly complex prompt, there will be many students who take roughly the same approach to many portions of it.</p>
<p>The person who copied the comments very obviously plagiarized, and I would pursue that with the professor with confidence.  However, I am personally reticent to wield the Plagiarism Hammer unless the proof is pretty incontrovertible for the reasons described above.  The video by the students is also evidence of thorough understanding, so you can use that to either strengthen or weaken your suspicions of cheating.</p>
<p>Ultimately, of course, it is for your professor to decide whether to pursue these matters, and I hope that you alerted the professor to the matter right at the start.  If you haven't, talk to them right away.  They need to know about these issues before a student or parent goes off to a dean to complain about the class.</p>

CC BY-SA 4.0
2022-02-03T15:17:11.123Z
Unless you're talking about something that's only a couple dozen lines of code, exact duplication except for variable names seems very unlikely. The larger the project, the easier it becomes to recognize plagiarism like this.
Barmar
CC BY-SA 4.0
2022-02-03T15:36:30.143Z
@Barmar Absolutely agreed.  I assumed that they were different since, in my experience, cheaters usually think to change those (often *only* those!), and because OP didn't mention that they were the same, which would have been a pretty material tell in establishing cheating.
Ben I.
CC BY-SA 4.0
2022-02-03T15:50:18.790Z
The OP wrote "Sometimes they change variable names but the implementation as a whole is just too similar. "
Barmar
CC BY-SA 4.0
2022-02-03T15:52:20.810Z
Of course, it will usually be a judgement call, but unless you're just talking about a couple of `for` loops, I think it will usually be pretty clear unless the grader is biased.
Barmar
CC BY-SA 4.0
2022-02-03T17:46:01.850Z
@Barmar I didn't notice that line.  As a crazy aside, one weird variable naming thing I noticed is that students will tend to use whatever variable you use for `for` loops.  If you almost always use `k` as your iterator, so will they.  Same for `i`, `m`, etc.  I once had an entire class of students use the same iterator as is my habit, and caught a cheater because she used a *different* iterator that I've never seen anyone use, which led me to a published solution that I wasn't aware of for the problem I'd given.  (There's no broader lesson there, just a weird thing that happened to me.)
Ben I.
CC BY-SA 4.0
2022-02-03T17:52:41.210Z
Beginners have trouble distinguishing coding requirements from arbitrary choices, so they just copy what they see, as a form of cargo-culting.
Barmar
CC BY-SA 4.0
2022-02-03T17:53:26.927Z
Although you have to be careful -- the student who didn't copy your habits might just be smart enough to realize that they can use different variables.
Barmar
CC BY-SA 4.0
2022-02-03T18:18:45.860Z
@Barmar They weren't. They copied a full, published solution, down to the comments, though they managed to cut off the final two `}`s, leaving it unable to compile, and they couldn't solve that problem.  That specific student was... certainly an outlier.  They were one of the causes of my question on this site about whether there are students who can't learn to code.
Ben I.
CC BY-SA 4.0
2022-02-03T18:20:30.757Z
Obviously if you found the original it was indeed plagiarism, so the clue worked. But it *could* have been a sign that they actually learned something. I know that's rare, so this is a horse, not a zebra.
Barmar
CC BY-SA 4.0
2022-02-04T18:08:19.110Z
@BenI. When I was a CS TA, dealing with classes of 250+ students, we ran all submissions through a utility which compared them *semantically* to flag potential cheaters (humans still had final say over the tool - it just pointed out likely copying).  So changing variable/function names would not fool it.  As a test, and knowing roughly how the utility works, I tried copying one of the better submissions and seeing how much I had to change in order to not be flagged - it took quite a bit of work - to the point where if you know enough to fake it, you should be able to just do it for real.
Darrel Hoffman
CC BY-SA 4.0
2022-02-04T18:12:19.763Z
@DarrelHoffman I've always been interested in using a system like that.  I never quite got around to setting up MOSS.  I'd assume that those kinds of tools work better on larger labs, while for small prompts, there would be many false flags.
Ben I.
CC BY-SA 4.0
2022-02-04T19:54:21.110Z
For sure, we didn't use it on simple assignments, but that was really only the first one (a glorified "Hello World").  Most assignments were complex enough to have any number of valid approaches, so 2 students solving it in the exact same way (semantically) would indeed be a pretty likely case of copying.  But most cheaters were not sophisticated enough to try changing names or even comments - we caught many people due to copied *whitespace*.  One had a comment at the top that was stolen from a previous student, then a fellow TA - with his name still in the comment.  Fun times.
Darrel Hoffman
CC BY-SA 4.0
2022-02-04T20:12:59.010Z
@DarrelHoffman Whoa, a TA provided his work to a current student? Crazy! What did the prof do???
Ben I.
CC BY-SA 4.0
2022-02-04T20:17:21.340Z
The TA was innocent, his code had been provided as an example in another class by a different professor - not realizing that the same assignment was being given to this one.  Lack of communication on their parts.  It led to an effort to stop reusing assignments from one year to the next, but coming up with new ones every semester takes a lot more work.
Darrel Hoffman
CC BY-SA 4.0
2022-02-05T16:47:01.030Z
If someone is not smart enough to edit the comments, I can't imagine how they think they could manage to code. What *is* the thought process behind this? Maybe wage pressure is more of a problem than we realize? I was so glad to finally finish college and start working!
Scott Rowe
CC BY-SA 4.0
2022-02-05T20:38:50.657Z
@ScottRowe Those kids don't even look at the comments. They've learned that it's not part of the code, and they've become afflicted with Comment Blindness.  I know that they're cheating, but I also find it kind of cute 
Ben I.
CC BY-SA 4.0
2022-02-02T13:47:33.000Z
2022-02-02T13:47:33.000Z
Ben I.

<p>I had had many years of industrial assembler experience before I did my degree, so the assembler module was a cakewalk for me, but a quagmire for my fellow students.</p>
<p>I was prevailed upon to demystify the use of stacks and pointers and suchlike, so I used a spare room one day to explain the concepts. Obviously, I used examples.</p>
<p>For a later assignment, a number of student made submissions using remarkably similar techniques and were individually interviewed by the academics who smelt plagiarism.</p>
<p>Fortunately, when I learns 'em, they stays learned, so they were able to adapt the techniques they used to other scenarios that the academics proposed, proving that they actually knew the subject and weren't mechanically copying.</p>

<p>I'd say that it's up to the academics to conduct any investigation and execute any students or appropriate remedies where the plagiarism is proved. As a TA, my opinion is that your actions should be limited to drawing the attention of the academics to your suspicions.</p>

CC BY-SA 4.0
2022-02-03T16:37:37.720Z
Great answer. Though I think "execute any students" is a bit harsh :-)
manassehkatz-Moving 2 Codidact
CC BY-SA 4.0
2022-02-03T20:33:11.147Z
@manassehkatz-Moving2Codidact Sounds a bit *lenient* to me, but I dealt with some rather persistent plagiarists when I was a TA, which may have skewed my perspective. :-)
Ray
CC BY-SA 4.0
2022-02-04T05:23:45.993Z
Some of my university courses asked us on assignments to declare any classmates we discussed the assignment with. I guess this gives the instructor advance notice in case some solutions look similar, instead of the instructor needing to discover that from scratch.
Nayuki
CC BY-SA 4.0
2022-02-03T02:59:47.123Z
2022-02-03T02:59:47.123Z
Magoo
<h2>How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!</h2>
<p>For code, I've found Stanford's <a href="https://theory.stanford.edu/%7Eaiken/moss/" rel="noreferrer">MOSS (Measure of Software Similarity)</a> to be an extremely useful tool. It compares submissions based on similarities in the abstract syntax tree rather than at the text level, so it sees right through attempts to hide plagiarism by renaming variables and reordering functions.  It also lets you feed it any example or template code you provided the students, so you don't get a bunch of false positives for people who copied a few lines from the lecture slides.</p>
<p>It's designed to detect plagiarism between students, rather than from online sources, but there's nothing stopping you from grabbing some sample code off the web and including it along with the regular submissions.</p>
<p>The output will be a list of assignment pairs, sorted by similarity. You can then click on each pair to see the similar parts highlighted. It is, like all such tools, to be used to get a shortlist of assignments you need to look at more closely, rather than a substitute for for hand-checking. That said, the false positive rate was very low in my experience, and there was usually a big drop in similarity scores where the plagiarized assignments ended and the ones that used similar ideas began.</p>
<h2>How can I help the students improve rather than just say 'you got 0 for plagiarism'?</h2>
<p>If you want to give them the benefit of the doubt, you can tell them:</p>
<ol>
<li>&quot;If you use material you got from somewhere else, cite it. It doesn't matter if you rephrase it; if you use someone else's ideas, give them credit. Sometimes an idea is common knowledge and doesn't need to be cited, but you can't go wrong by erring on the side of citing (or by asking the TA or professor).&quot;</li>
<li>&quot;If your submission consists entirely of code you found on the web, and you cite it properly, you won't get a zero for plagiarism. You will get a zero because the assignment was to <em>write code</em> and you didn't do that.&quot;  (I failed to include this caveat once; you can guess what the results were.)</li>
</ol>
<p>Having done so, if they still plagiarize, they're beyond help. Failure to know what constitutes plagiarism may be the fault of their grade school teachers who failed to explain it properly. If, knowing the definition, they still do it, it's a failure of ethics. Give them a zero and inform the professor so they can be sent to the academic misconduct board. It's hard not to feel bad if the consequences are severe, but dishonesty is harmful (or even dangerous) in science and engineering. Going easy on the cheater risks harming others. (This assumes that you're <em>certain</em> they plagiarized. Throw the book at them if you can prove it, but keep the standards of proof high enough to eliminate false positives.)</p>

CC BY-SA 4.0
2022-02-03T20:23:09.327Z
2022-02-03T20:42:50.527Z
2022-02-03T20:42:50.527Z
Ray
<p>Students cooperate.  This should be encouraged.  The whole idea of stackexchange.com is cooperation.  And it is a very good idea.</p>
<p>The problem is drawing the line between cooperation and plagiarism.</p>
<p>My personal definition in cases like this hinges on the question &quot;Has the student learned the lesson?&quot;.  Yes means cooperation, no means plagiarism.</p>
<p>So, if you have the manpower to spare, call in each suspect separately and ask them to explain their code.</p>
<p>If they can explain it, they have cooperated.
If they can't, they have plagiarized.</p>
<p>Note that this is not a code review.  It is a test to see if they understand their own code, and this should be made clear to them.</p>

CC BY-SA 4.0
2022-02-04T04:16:13.980Z
Kinda a weird question to ask on SE... +1. Say, "Good job, just like in the real world." ?
Mazura
CC BY-SA 4.0
2022-02-04T13:54:47.007Z
@stighemmer "If they can explain it, they have cooperated. If they can't, they have plagiarized." Yes! (Ooops! Did I plagiarize your comment? Ah, well)
Clive Long
CC BY-SA 4.0
2022-02-03T11:22:34.133Z
2022-02-03T11:22:34.133Z
Stig Hemmer
<p>Can you arrange a class with the Student, Lecturer and you. Let them write one of the program (simplest one) on a piece of paper.</p>
<p>The students who can write it correctly without a code editor are the ones who understands the concept however lazy to write it all over again - we can somehow let them go with a good grade because the purpose of teaching them is complete.</p>
<p>Those students who can't do are the one should get a Zero plus a self guilt that everyone now knows they copied their assignments without knowing a bit how it is done. I am sure they won't repeat the same thing again and you will not have to say them that &quot;You copied the assignments&quot;.</p>

CC BY-SA 4.0
2022-02-04T11:49:42.200Z
2022-02-04T11:49:42.200Z
Kunal Khivensara
<p>As TA you need to be aware of your end goal. Do you wish to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects.</p>
<p>I would go this route only in cases of blatant and repeated offenses.</p>
<p>I suggest solving the cases internally and turning them into teachable moments.</p>
<p>Invite the suspected students one by one and explain that their solution looks suspiciously similar to a blog post. Ask them to explain the similarity. Of course, initially, all students will deny any wrongdoing. However, you can inquire about the details and ask them to expand their solution on the spot.</p>
<p>One of three things will happen:</p>
<ol>
<li><p>Their answers will expose the plagiarism. Punish them as you and your prof see fit.</p>
</li>
<li><p>You will find that students indeed got overly inspired by the solution online, however their understanding of it matches the course objectives. Warn them about copying stuff from the internet and let them go.</p>
</li>
</ol>
<p>There is nothing inherently wrong with using resources online to solve problems. Especially, in a field like CS. The issue is if they do it without much understanding.</p>
<ol start="3">
<li>Your suspicions will be removed because there are only so many ways to solve the problem.</li>
</ol>
<p>In either case, update the assignment to minimize the chances that there is a solution online.</p>

CC BY-SA 4.0
2022-02-04T13:23:37.243Z
"Do you to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects."  This is not exactly untrue, but it is a twisted way of thinking about it. Who broke the rules in spite of being made very aware of the consequences? There are consequences to actions determined by the institution *that the students agreed to when they matriculated*.  You may choose to have mercy, but you make it sound like the instructor (as a representative of the school) should feel *culpable* for enforcing the rules. They should not.
Ben I.
CC BY-SA 4.0
2022-02-03T18:16:43.950Z
2022-02-03T18:16:43.950Z
user11632
<p>I am a TA for an undergraduate CS module at university in the UK and was in charge of marking coursework. The assignment contains three parts: report, code and video presentation. I found that 10 students submitted code that was a bit too similar to some blog posts. I gave the students 0 for the programming assignment, and now they are complaining.</p>
<p>For the first  complaint, I made a report containing screen shots of the students submission and the blog post. I also commented on how the assignment could be better, but now there is another student complaining. What if all the others complain too?</p>
<p>This is my first time as a TA and the first time I have to deal with plagiarism. All communication between me and students goes through the lecturer. They complain to him, he passes on the message and replies to them based on what I say.</p>
<ul>
<li>How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!</li>
<li>How can I help the students improve rather than just say 'you got 0 for plagiarism'?</li>
</ul>

CC BY-SA 4.0
2022-02-08T20:23:17.143Z
Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/133971/discussion-on-question-by-marcus-what-to-tell-students-that-plagiarised-their-pr).
Ben I.
<programming><assessment><plagiarism>
What to tell students that plagiarised their programming assignment?
# What to tell students that plagiarised their programming assignment?

(Asked by: username_0 on 2022-02-02)

I am a TA for an undergraduate CS module at university in the UK and was in charge of marking coursework. The assignment contains three parts: report, code and video presentation. I found that 10 students submitted code that was a bit too similar to some blog posts. I gave the students 0 for the programming assignment, and now they are complaining.

For the first complaint, I made a report containing screen shots of the students submission and the blog post. I also commented on how the assignment could be better, but now there is another student complaining. What if all the others complain too?

This is my first time as a TA and the first time I have to deal with plagiarism. All communication between me and students goes through the lecturer. They complain to him, he passes on the message and replies to them based on what I say.

* How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!
* How can I help the students improve rather than just say 'you got 0 for plagiarism'?

**Tags:** programming, assessment, plagiarism

> **Comments:**
> **username_1**: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/133971/discussion-on-question-by-marcus-what-to-tell-students-that-plagiarised-their-pr).  

---

## 9 answers

### Answer by username_3 on 2022-02-02. Score: 26 | Accepted answer

As a TA you are working for a professor. They are fundamentally responsible for grading. It would have been better had you checked with the prof before assigning grades and getting advice. But what you did is reasonable.

I think you are covered on proof, given that you took screen shots. But it is the prof who will decide on how to handle the complaints. If they behave well they will back you up, though possibly with accommodations. But let the prof decide, with your advice. Don't try to take too much responsibility for the outcome.

Long term, the prof might think about not giving assignments that can be easily plagiarized, but that isn't your responsibility.

As for helping them, they need a good and proper definition of plagiarism and and explanation of why it is wrong, both ethically and pedagogically. They have failed to learn something as well as crossed an ethical line.

A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade.

So, you need to bring it to the prof's attention. In some large classes with many TAs there is a "head TA". In that case, bring it to them first as they likely have more experience than yourself.

The complaints, themselves, those already posted and future ones, should be referred upwards also.

> **Comments:**
> **username_0**: Thank you for your answer. I already submitted my comments to my supervisor. I'm not sure what will happen next, but I hope the other students don't complain too much.  
> **username_1**: @username_0 Follow your supervisor's lead, and don't worry too much about the complaints.  Run responses by your supervisor before you send them out, and make sure that they are present at all meetings.  If a student corners you, tell them that you would be happy to schedule a meeting to discuss it.  The only way you can get yourself into hot water here is if you don't follow your supervisor's lead.  
> **username_4**: It's worth also noting that plagiarism specifically & usually [everywhere I've been] falls under Academic Misconduct policies. As such it likely has explicit policy based guidelines for proper handling; for example, for my institution, there's an entire flowchart: https://www.montana.edu/deanofstudents/academicmisconduct/academicmisconduct.html . So, @username_3 definitely has the best way to handle this in the future: to pass your suspicions and related documentation/evidence back to the professor to handle at their discretion, rather than assigning a grade yourself based on suspected plagiarism.  
> **username_5**: At my undergraduate university, a first infraction would result in an automatic 0 for *the entire course*.  
> **username_6**: I am very much surprised that I so frequently see suggestions such as "*A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade*". In my POV, this basically tells students that it's free to cheat - if they don't get caught, they receive a positive grade. If they do get caught, then they can start doing honest work. I feel like this does not value the tutors' time. One may say that students only cheat themselveses while cheating in order to obtain a passing grade, but...  
> **username_6**: ...but it omits the fact that some universities are respected for their alumni's skills. If *the field* starts being flooded by incompetent alumnis because the university did not care enough to catch (at least some) cheaters, it loses credibility. This may not be a big issue for some, but for other faculties this is quite crucial. What's more, I find that many honest students get heavily discouraged when cheating is being ignored. They feel like it's not worth it to be honest. This is, of course, not true, but I do not believe that it would be easy to change their approach / feelings.  

---

### Answer by username_1 on 2022-02-02. Score: 29

While there are an infinity of ways to write code that accomplishes any task, in tasks simple enough for labs, there are usually only two to four **reasonable** approaches for each step, and certain amounts of fluency in coding practice will tend to bring approaches even further in line.

So, in a lab project that has, say, three essential steps to it, there will be something like eight to sixty-four reasonable approaches to the whole thing. If even one of the steps only has two reasonable approaches, then you'll be down to sixteen reasonable approaches at the maximum. You're well into the territory in which you should see some *very* similar student responses, even if everyone is doing their own work.

Even with a fairly complex prompt, there will be many students who take roughly the same approach to many portions of it.

The person who copied the comments very obviously plagiarized, and I would pursue that with the professor with confidence. However, I am personally reticent to wield the Plagiarism Hammer unless the proof is pretty incontrovertible for the reasons described above. The video by the students is also evidence of thorough understanding, so you can use that to either strengthen or weaken your suspicions of cheating.

Ultimately, of course, it is for your professor to decide whether to pursue these matters, and I hope that you alerted the professor to the matter right at the start. If you haven't, talk to them right away. They need to know about these issues before a student or parent goes off to a dean to complain about the class.

> **Comments:**
> **username_10**: Unless you're talking about something that's only a couple dozen lines of code, exact duplication except for variable names seems very unlikely. The larger the project, the easier it becomes to recognize plagiarism like this.  
> **username_1**: @username_10 Absolutely agreed.  I assumed that they were different since, in my experience, cheaters usually think to change those (often *only* those!), and because OP didn't mention that they were the same, which would have been a pretty material tell in establishing cheating.  
> **username_10**: The OP wrote "Sometimes they change variable names but the implementation as a whole is just too similar. "  
> **username_10**: Of course, it will usually be a judgement call, but unless you're just talking about a couple of `for` loops, I think it will usually be pretty clear unless the grader is biased.  
> **username_1**: @username_10 I didn't notice that line.  As a crazy aside, one weird variable naming thing I noticed is that students will tend to use whatever variable you use for `for` loops.  If you almost always use `k` as your iterator, so will they.  Same for `i`, `m`, etc.  I once had an entire class of students use the same iterator as is my habit, and caught a cheater because she used a *different* iterator that I've never seen anyone use, which led me to a published solution that I wasn't aware of for the problem I'd given.  (There's no broader lesson there, just a weird thing that happened to me.)  
> **username_10**: Beginners have trouble distinguishing coding requirements from arbitrary choices, so they just copy what they see, as a form of cargo-culting.  
> **username_10**: Although you have to be careful -- the student who didn't copy your habits might just be smart enough to realize that they can use different variables.  
> **username_1**: @username_10 They weren't. They copied a full, published solution, down to the comments, though they managed to cut off the final two `}`s, leaving it unable to compile, and they couldn't solve that problem.  That specific student was... certainly an outlier.  They were one of the causes of my question on this site about whether there are students who can't learn to code.  
> **username_10**: Obviously if you found the original it was indeed plagiarism, so the clue worked. But it *could* have been a sign that they actually learned something. I know that's rare, so this is a horse, not a zebra.  
> **username_11**: @BenI. When I was a CS TA, dealing with classes of 250+ students, we ran all submissions through a utility which compared them *semantically* to flag potential cheaters (humans still had final say over the tool - it just pointed out likely copying).  So changing variable/function names would not fool it.  As a test, and knowing roughly how the utility works, I tried copying one of the better submissions and seeing how much I had to change in order to not be flagged - it took quite a bit of work - to the point where if you know enough to fake it, you should be able to just do it for real.  
> **username_1**: @DarrelHoffman I've always been interested in using a system like that.  I never quite got around to setting up MOSS.  I'd assume that those kinds of tools work better on larger labs, while for small prompts, there would be many false flags.  
> **username_11**: For sure, we didn't use it on simple assignments, but that was really only the first one (a glorified "Hello World").  Most assignments were complex enough to have any number of valid approaches, so 2 students solving it in the exact same way (semantically) would indeed be a pretty likely case of copying.  But most cheaters were not sophisticated enough to try changing names or even comments - we caught many people due to copied *whitespace*.  One had a comment at the top that was stolen from a previous student, then a fellow TA - with his name still in the comment.  Fun times.  
> **username_1**: @DarrelHoffman Whoa, a TA provided his work to a current student? Crazy! What did the prof do???  
> **username_11**: The TA was innocent, his code had been provided as an example in another class by a different professor - not realizing that the same assignment was being given to this one.  Lack of communication on their parts.  It led to an effort to stop reusing assignments from one year to the next, but coming up with new ones every semester takes a lot more work.  
> **username_12**: If someone is not smart enough to edit the comments, I can't imagine how they think they could manage to code. What *is* the thought process behind this? Maybe wage pressure is more of a problem than we realize? I was so glad to finally finish college and start working!  
> **username_1**: @ScottRowe Those kids don't even look at the comments. They've learned that it's not part of the code, and they've become afflicted with Comment Blindness.  I know that they're cheating, but I also find it kind of cute   

---

### Answer by username_13 on 2022-02-03. Score: 12

I had had many years of industrial assembler experience before I did my degree, so the assembler module was a cakewalk for me, but a quagmire for my fellow students.

I was prevailed upon to demystify the use of stacks and pointers and suchlike, so I used a spare room one day to explain the concepts. Obviously, I used examples.

For a later assignment, a number of student made submissions using remarkably similar techniques and were individually interviewed by the academics who smelt plagiarism.

Fortunately, when I learns 'em, they stays learned, so they were able to adapt the techniques they used to other scenarios that the academics proposed, proving that they actually knew the subject and weren't mechanically copying.

I'd say that it's up to the academics to conduct any investigation and execute any students or appropriate remedies where the plagiarism is proved. As a TA, my opinion is that your actions should be limited to drawing the attention of the academics to your suspicions.

> **Comments:**
> **username_14**: Great answer. Though I think "execute any students" is a bit harsh :-)  
> **username_15**: @manassehkatz-Moving2Codidact Sounds a bit *lenient* to me, but I dealt with some rather persistent plagiarists when I was a TA, which may have skewed my perspective. :-)  
> **username_16**: Some of my university courses asked us on assignments to declare any classmates we discussed the assignment with. I guess this gives the instructor advance notice in case some solutions look similar, instead of the instructor needing to discover that from scratch.  

---

### Answer by username_7 on 2022-02-03. Score: 9

There is a point where you should award some marks for the code being complete and producing the output. If the code is only part of the assessment and the student was not capable of writing it themselves, then the other elements are likely to be of low quality. It is reasonable to assume that *correct* code in many cases *should* look similar, so to award a ***Zero*** would mean you are certain that plagiarism or collusion has occurred, in which case you should have no problem defending your assessment.

Most institutions would have a clear policy around plagiarism, if you have such a policy then when there is a dispute or challenge to your assessment on the grounds of plagiarism you need only to remind the students of the policy, that policy should guide you on both how it is detected and what the penalties are.

* If you do not have a policy on plagiarism, then be sure to establish one, even if it is a preference that might be hard to enforce, make it clear *before* the assessment task that plagiarism and collusion are not going to be tolerated.

One strategy to discourage plagiarism in programming is to encourage creativity, by requiring students to design their own models and scenarios and even the test harnesses to demonstrate certain techniques. It takes a lot of work, and you can't rely as much on automation for reviews, but even if the students source blocks of logic from SO or each other, if the models they are applying the logic to are unique then they will still have to understand the code to make it work.

You can also complete an assessment over time, or turn submission into more of a folio of work, apart from making it easier to detect plagiarism as the complexity of the assessment content goes up, you can lower the bar in terms of effort required by the student, especially if there is a chance to complete the tasks during class times.

As to how to help the students improve when they are caught out, give them the opportunity to re-submit, but this time give them a *different* assessment item. With different requirements they can not simply re-write the syntax from the previous submission, they will be forced to think about it even if they are going to apply some or all of the code in the first assessment.

* A simple trick here is to change the subject or topic of the content. This will actually help you identify if they understand the difference between encapsulating abstract concepts and the business domain concepts.

---

Whilst facetious, it must be recognised that the point of learning is not to re-invent everything, but that we should continue to evolve and build upon established concepts. This is true for programming as much as other domains. The reality of how programming is applied in commercial contexts is that there is a lot of skill in locating and understanding the correct pattern or solution to apply to a logical problem domain and how to implement it correctly.

* In layman's terms this is effective use of `Cut'n'Paste`

A good developer does not re-invent the wheel, they determine how to fit the a standard wheel implementation into their model.

> I can't help but share [my favourite quote from Eric Lippert](https://stackoverflow.blog/2019/12/19/what-senior-developers-can-learn-from-beginners/?cb=1&_ga=2.139093171.1049773760.1643802433-513005019.1591708658):  
> *The notion that programming can be principled — that we proceed by understanding the abstractions afforded by the language, and then match those abstractions to a model of the business domain of the program — is apparently never taught to a great many programmers. Rather, many programmers proceed as though they’re exploring an undiscovered country, and going down paths more or less at random and hoping they end up somewhere good, no matter how twisted the path is that gets them there.*

It is true there may be a unique solution to every problem, the construct of institutionalized education is such that many problem statements used in assessments have been used before, so avoiding plagiarism from sites like SO would require your assessment criteria itself to unique. Try assessing Fizz-Buzz in a room of students with no external communications, depending on how you have taught the concepts there is likely to be a strong commonality in the style, layout and logical expressions utilised to produce the result. Programming is *very* logical, just like mathematics there are *right* answers and many that are clearly *wrong*. But the processes used to work out the result will be influenced by the tuition and other experiences of the student, if all their experiences and learning is shared or taught from a common source, then it makes sense that the outcomes would be similar from students across a class or cohort.

Although not very practical, to determine plagiarism, you should be looking for the personal quirks of one student to be reflected in the others, try comparing the mistakes or omissions, as opposed to the correct elements. Or the reverse, that the quirks of the submission are not consistent with any previous work from that same student. If in the other elements the student has demonstrated a genuine understanding of the code, and an ability to recreate it if given ample opportunity, then whilst you can disapprove of it, without stronger grounds or investigation it should be marked according to its content.

> **Comments:**
> **username_8**: V good answer. I was thinking of making similar but thought it too scandalous. Copying/non-reinventing  is a software-engineering **positive**. (Modulo licences etc) It's deleterious effects are remote from morality -- student is **evil**. More of a logistical question : In the face of copying how to evaluate/grade? Once that is recognized the next step is patent : copying represents not failure of student but of system. Dijkstra said it; I've generally followed: One big reason to eschew mainstream omnibus languages is precisely to obviate the *cut-paste from stackoverflow* bug  
> **username_8**: I liked the quote in ur profile: Don't reinvent the wheel, realign it! That said the teacher's task is non trivial. Children need to reinvent... Electrical with mechano, buildings with Lego .... They need to step thru Pythagoras' proof even if that doesn't make them Pythagoras. Not invalidating any of above. Just reasserting: To he effective, academics needs to be in a walled garden; not just evaluating but teaching also  
> **username_7**: It was too hard to escape the irony of learning to NOT copy code, only to find commercially it is practical on a number of levels to copy existing documented code patterns. Realistically understanding how to research APIs and best practices and when to copy code can be a great skill itself.  
> **username_9**: @ChrisSchaller I've actually had a senior officer in the company ask me why programmers were writing their own code and not just copying it off the internet.  

---

### Answer by username_17 on 2022-02-03. Score: 8

Students cooperate. This should be encouraged. The whole idea of stackexchange.com is cooperation. And it is a very good idea.

The problem is drawing the line between cooperation and plagiarism.

My personal definition in cases like this hinges on the question "Has the student learned the lesson?". Yes means cooperation, no means plagiarism.

So, if you have the manpower to spare, call in each suspect separately and ask them to explain their code.

If they can explain it, they have cooperated.
If they can't, they have plagiarized.

Note that this is not a code review. It is a test to see if they understand their own code, and this should be made clear to them.

> **Comments:**
> **username_18**: Kinda a weird question to ask on SE... +1. Say, "Good job, just like in the real world." ?  
> **username_19**: @stighemmer "If they can explain it, they have cooperated. If they can't, they have plagiarized." Yes! (Ooops! Did I plagiarize your comment? Ah, well)  

---

### Answer by username_15 on 2022-02-03. Score: 5

## How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!

For code, I've found Stanford's [MOSS (Measure of Software Similarity)](https://theory.stanford.edu/%7Eaiken/moss/) to be an extremely useful tool. It compares submissions based on similarities in the abstract syntax tree rather than at the text level, so it sees right through attempts to hide plagiarism by renaming variables and reordering functions. It also lets you feed it any example or template code you provided the students, so you don't get a bunch of false positives for people who copied a few lines from the lecture slides.

It's designed to detect plagiarism between students, rather than from online sources, but there's nothing stopping you from grabbing some sample code off the web and including it along with the regular submissions.

The output will be a list of assignment pairs, sorted by similarity. You can then click on each pair to see the similar parts highlighted. It is, like all such tools, to be used to get a shortlist of assignments you need to look at more closely, rather than a substitute for for hand-checking. That said, the false positive rate was very low in my experience, and there was usually a big drop in similarity scores where the plagiarized assignments ended and the ones that used similar ideas began.

## How can I help the students improve rather than just say 'you got 0 for plagiarism'?

If you want to give them the benefit of the doubt, you can tell them:

1. "If you use material you got from somewhere else, cite it. It doesn't matter if you rephrase it; if you use someone else's ideas, give them credit. Sometimes an idea is common knowledge and doesn't need to be cited, but you can't go wrong by erring on the side of citing (or by asking the TA or professor)."
2. "If your submission consists entirely of code you found on the web, and you cite it properly, you won't get a zero for plagiarism. You will get a zero because the assignment was to *write code* and you didn't do that." (I failed to include this caveat once; you can guess what the results were.)

Having done so, if they still plagiarize, they're beyond help. Failure to know what constitutes plagiarism may be the fault of their grade school teachers who failed to explain it properly. If, knowing the definition, they still do it, it's a failure of ethics. Give them a zero and inform the professor so they can be sent to the academic misconduct board. It's hard not to feel bad if the consequences are severe, but dishonesty is harmful (or even dangerous) in science and engineering. Going easy on the cheater risks harming others. (This assumes that you're *certain* they plagiarized. Throw the book at them if you can prove it, but keep the standards of proof high enough to eliminate false positives.)


---

### Answer by username_20 on 2022-02-04. Score: 2

Can you arrange a class with the Student, Lecturer and you. Let them write one of the program (simplest one) on a piece of paper.

The students who can write it correctly without a code editor are the ones who understands the concept however lazy to write it all over again - we can somehow let them go with a good grade because the purpose of teaching them is complete.

Those students who can't do are the one should get a Zero plus a self guilt that everyone now knows they copied their assignments without knowing a bit how it is done. I am sure they won't repeat the same thing again and you will not have to say them that "You copied the assignments".


---

### Answer by username_21 on 2022-02-03. Score: 2

As TA you need to be aware of your end goal. Do you wish to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects.

I would go this route only in cases of blatant and repeated offenses.

I suggest solving the cases internally and turning them into teachable moments.

Invite the suspected students one by one and explain that their solution looks suspiciously similar to a blog post. Ask them to explain the similarity. Of course, initially, all students will deny any wrongdoing. However, you can inquire about the details and ask them to expand their solution on the spot.

One of three things will happen:

1. Their answers will expose the plagiarism. Punish them as you and your prof see fit.
2. You will find that students indeed got overly inspired by the solution online, however their understanding of it matches the course objectives. Warn them about copying stuff from the internet and let them go.

There is nothing inherently wrong with using resources online to solve problems. Especially, in a field like CS. The issue is if they do it without much understanding.

3. Your suspicions will be removed because there are only so many ways to solve the problem.

In either case, update the assignment to minimize the chances that there is a solution online.

> **Comments:**
> **username_1**: "Do you to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects."  This is not exactly untrue, but it is a twisted way of thinking about it. Who broke the rules in spite of being made very aware of the consequences? There are consequences to actions determined by the institution *that the students agreed to when they matriculated*.  You may choose to have mercy, but you make it sound like the instructor (as a representative of the school) should feel *culpable* for enforcing the rules. They should not.  

---

### Answer by username_2 on 2022-02-05. Score: 1

> What to tell students that plagiarised their programming assignment?

[Where I went to school](https://honesty.uark.edu/policy/index.php#sanction-rubric), one would tell the students, *"You have now received a grade of* F *for this course. For this violation of the University's Academic Integrity Policy, you have been given 1.0 sanction points. An accumuation of 1.5 sanction points will result—depending on the circumstances—in your suspension or expulsion from this school."*

> How can I prove plagiarism?

At my school, the standard is Preponderance of Evidence, which means *"evidence...of greater weight...than evidence to the contrary"*.

So it's your evidence against theirs (and if they're relying on a 1-2% difference in word choices as their evidence, then I pity them).


---

