You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With PR #1524 we will introduce the ability to add a template file to the Dolos analysis. Any code fragments / fingerprints matching with this template file will be ignored. For example:
The class definition and constructor are ignored, but the actual implementation itself not. In this example, only a few lines in the hash function match, but since the other lines are template code, there is still 59% similarity.
In addition, the ability is added to automatically detect code to ignore if fingerprints occur in a high fraction (or absolute count) of the total analyzed files.
As of PR #1524 this will be passed through a command-line parameter --ignore <path>. However, there is no way to communicate this directly through the UI of the web view.
Changes needed
Lib:
The most easy way to implement this, is to just add the template code through the info.csv. This would not require any other changes to make this work, but I think the additional changes below might be beneficial.
Web:
update the upload form with an "advanced" section, where additional parameters can be specified like-M (maximum fingerprint percentage), the kgram size, window size, etc.
We would prefer the info.csv solution for our use case here at Aalto. In exercises that have multiple files this template.{ext} would possibly cause some issues and not be able to support having multiple template files as easily. Thus the info.csv would be more futureproof in this case even though multi-file submissions are not yet supported. Perhaps both solutions could coexist so that if the info.csv does not have it defined, then it would use the template.{ext} if it can find one.
rien
changed the title
Importing template/boilerplate code - prefered way to communicate this to Dolos
Importing template/boilerplate code
Sep 20, 2024
Context
With PR #1524 we will introduce the ability to add a template file to the Dolos analysis. Any code fragments / fingerprints matching with this template file will be ignored. For example:
The class definition and constructor are ignored, but the actual implementation itself not. In this example, only a few lines in the
hash
function match, but since the other lines are template code, there is still 59% similarity.In addition, the ability is added to automatically detect code to ignore if fingerprints occur in a high fraction (or absolute count) of the total analyzed files.
As of PR #1524 this will be passed through a command-line parameter
--ignore <path>
. However, there is no way to communicate this directly through the UI of the web view.Changes needed
Lib:
The most easy way to implement this, is to just add the template code through the
info.csv
. This would not require any other changes to make this work, but I think the additional changes below might be beneficial.Web:
-M
(maximum fingerprint percentage), thekgram
size,window
size, etc.API: accept the extra advanced parameters and pass them to the Dolos container
The text was updated successfully, but these errors were encountered: