dodona-edu / dolos

:detective: Source code plagiarism detection
https://dolos.ugent.be
MIT License
270 stars 33 forks source link

Creating templates to ignore sections of code #1213

Closed shreykshah closed 6 months ago

shreykshah commented 1 year ago

Is it possible to mark certain lines as a template such that sections of code are ignored? For example, if I have handed students some starter code to work with and asked them to modify small sections, the software similarity will come back as extremely high. I am trying to ensure the starter code is ignored.

rien commented 1 year ago

This is indeed something we want to support, this was working at one point but seems to be broken currently (#1163).

If you're using the CLI, you can experiment with using the -m or -M flags: this allows you to ignore the most common fingerprints in the dataset you're analyzing (see dolos --help for more info). But this does currently seem to have a bug.

We're planning on reworking this feature and integrating this in our front-end in the coming months however, so if you're using the web application, you will need to exercise some patience.

shreykshah commented 1 year ago

The -m or -M flags are not necessarily robust, where we have to guess what the best values for these flags would be given our template. Are there any plans for explicit template support?

rien commented 1 year ago

Yes, template support will be a port of this rework, as well as integrating this in the web application.

shreykshah commented 1 year ago

I plan on using the CLI. Would there be any way to approximate this for a two student course in the meantime (perhaps submitting the template as a third student and setting -M 1)?

rien commented 6 months ago

We have added experimental support for ignoring template code and frequent fingerprints in PR https://github.com/dodona-edu/dolos/pull/1524