<p>I'm experimenting with using <a href="https://theory.stanford.edu/%7Eaiken/moss/" rel="nofollow noreferrer">MOSS</a> to help detect plagiarism in student code.</p>
<p>In my first experiment with real code, I am confused with the results;
Some pairs of students were flagged as having code in common, other pairs had the same code but it wasn't flagged.</p>
<p>In most cases the common code was boilerplate provided by me, and I used the <code>-b</code> flag to tell MOSS to ignore this code in similarity detection.</p>
<p>In the screenshots below, the first correctly ignores identical code at the start of the file (boilerplate).</p>
<p>In the second image, the boilerplate at the start for the file is flagged as a &quot;match&quot;.</p>
<p>Both images are results from the same assignment with the following command</p>
<p><code>moss.pl -l cc -b Observer_Worksheet.cpp ./*/*.cpp</code></p>
<p>What is going on here?</p>
<p><a href="https://i.sstatic.net/jrgSQ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jrgSQ.png" alt="enter image description here" /></a></p>
<hr />
<p><a href="https://i.sstatic.net/sGgf2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/sGgf2.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2024-03-22T21:44:40.857Z
Why not ask Stanford?
Buffy
CC BY-SA 4.0
2024-03-23T15:49:13.617Z
@Buffy Do they have a support line? If they do I can't find it.
Ken
CC BY-SA 4.0
2024-03-24T08:24:02.703Z
Have you checked for white space differences?
Kai
CC BY-SA 4.0
2024-03-24T10:16:07.053Z
@Kai a `diff` of the first two shows no difference until line 38. Regardless, the reason I want to use Moss is that it "sees" past surface level differences like whitespace and spelling.
Ken
CC BY-SA 4.0
2024-03-24T12:46:38.143Z
Disclaimer: I'm doing this from memory. Can't check now. But anyway. Moss's first chunk is lines 1-62, which includes that line 38. When it does pick up on issues in copies of provided code it's often due to weird extra white space changes that are rare but not singular among the submitted files.
Kai
<plagiarism>
MOSS flags boilerplate code as similar in some pairs but not flagged in other pairs
# MOSS flags boilerplate code as similar in some pairs but not flagged in other pairs

(Asked by: username_0 on 2024-03-22)

I'm experimenting with using [MOSS](https://theory.stanford.edu/%7Eaiken/moss/) to help detect plagiarism in student code.

In my first experiment with real code, I am confused with the results;
Some pairs of students were flagged as having code in common, other pairs had the same code but it wasn't flagged.

In most cases the common code was boilerplate provided by me, and I used the `-b` flag to tell MOSS to ignore this code in similarity detection.

In the screenshots below, the first correctly ignores identical code at the start of the file (boilerplate).

In the second image, the boilerplate at the start for the file is flagged as a "match".

Both images are results from the same assignment with the following command

`moss.pl -l cc -b Observer_Worksheet.cpp ./*/*.cpp`

What is going on here?

[![enter image description here](https://i.sstatic.net/jrgSQ.png)](https://i.sstatic.net/jrgSQ.png)

---

[![enter image description here](https://i.sstatic.net/sGgf2.png)](https://i.sstatic.net/sGgf2.png)

**Tags:** plagiarism

> **Comments:**
> **username_1**: Why not ask Stanford?  
> **username_0**: @username_1 Do they have a support line? If they do I can't find it.  
> **username_2**: Have you checked for white space differences?  
> **username_0**: @username_2 a `diff` of the first two shows no difference until line 38. Regardless, the reason I want to use Moss is that it "sees" past surface level differences like whitespace and spelling.  
> **username_2**: Disclaimer: I'm doing this from memory. Can't check now. But anyway. Moss's first chunk is lines 1-62, which includes that line 38. When it does pick up on issues in copies of provided code it's often due to weird extra white space changes that are rare but not singular among the submitted files.  

---

## 0 answers

