Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with same root directory name #1445

Open
Kr0nox opened this issue Dec 14, 2023 · 4 comments
Open

Issues with same root directory name #1445

Kr0nox opened this issue Dec 14, 2023 · 4 comments
Labels
bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change

Comments

@Kr0nox
Copy link
Member

Kr0nox commented Dec 14, 2023

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
Copy link
Member Author

Kr0nox commented Jan 11, 2024

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 Kr0nox added this to the v5.0.0 milestone Jan 11, 2024
@tsaglam tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change labels Jan 22, 2024
@tsaglam
Copy link
Member

tsaglam commented Jan 29, 2024

Partially addressed by #1495, thus not closed.

@tsaglam tsaglam removed this from the v5.0.0 milestone Feb 21, 2024
@euberdeveloper
Copy link

euberdeveloper commented Jul 8, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change
Projects
None yet
Development

No branches or pull requests

3 participants