JPlag icon indicating copy to clipboard operation
JPlag copied to clipboard

Issues with same root directory name

Open Kr0nox opened this issue 1 year ago • 4 comments

If people use the same root directory two problems can occur.

  1. The root directories have the same name, but the submissions have different names Folder structur
└ jplag.jar
└ files
|   └ A
└ test
|   └ files
|       └ C

executed with jplag.jar files -new test/files Here is the generated report: results_A_C.zip In the viewer we are not able to distinguish from wich files folder each submission came from. we should discuss wether this is an issue.

  1. Same root dir name and submission with same name. Folder structur
└ jplag.jar
└ files
|   └ A
|       └ CLI.java
└ test
|   └ files
|       └ A
|           └ CLIOptions.java

executed with jplag.jar files -new test/files Here is the generated report: results_A_A.zip Again, we cant tell from which folder each submission came from. This is defineatly an issue since they have the same name. In addition only the files from one of the submissions are present in the files folder in the zip. Due to this matches cant be shown. This again is an issue.

All test were done with a build from the develop branch.

Kr0nox avatar Dec 14 '23 10:12 Kr0nox

In the meeting we sumarized that the first issue is "ok" and will not need to be fixed in the next major version. The second issue is important tho and should be fixed in v5.

Handled by throwing an error when directories have same name

Kr0nox avatar Jan 11 '24 13:01 Kr0nox

Partially addressed by #1495, thus not closed.

tsaglam avatar Jan 29 '24 07:01 tsaglam

If people use the same root directory two problems can occur.

  1. The root directories have the same name, but the submissions have different names Folder structur
└ jplag.jar
└ files
|   └ A
└ test
|   └ files
|       └ C

executed with jplag.jar files -new test/files Here is the generated report: results_A_C.zip In the viewer we are not able to distinguish from wich files folder each submission came from. we should discuss wether this is an issue.

  1. Same root dir name and submission with same name. Folder structur
└ jplag.jar
└ files
|   └ A
|       └ CLI.java
└ test
|   └ files
|       └ A
|           └ CLIOptions.java

executed with jplag.jar files -new test/files Here is the generated report: results_A_A.zip Again, we cant tell from which folder each submission came from. This is defineatly an issue since they have the same name. In addition only the files from one of the submissions are present in the files folder in the zip. Due to this matches cant be shown. This again is an issue.

All test were done with a build from the develop branch.

I am not sure if I should continue the discussion in this issue or the other (#1849). My feature request regards addressing this. By considering the same directory tree:

> 
> └ jplag.jar
> └ files
> |   └ A
> └ test
> |   └ files
> |       └ C
> 

what I would do is keeping the shortest common path to distinguish them, in this case the names wouldn't be files/A and files/C but files/a and test/files/C. I am aware that it is not immediate to find a solution like this and to change the code, but I think this would fix the issue.

euberdeveloper avatar Jul 08 '24 15:07 euberdeveloper

I have implemented a proof of concept with a possible solution in this fork/branch:https://github.com/euberdeveloper/JPlag/tree/feature/allow-duplicate-submission-names

euberdeveloper avatar Jul 08 '24 20:07 euberdeveloper