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

Missing matches when using JPlag 3 #373

Closed
sloboegen opened this issue Apr 16, 2022 · 6 comments · Fixed by #911
Closed

Missing matches when using JPlag 3 #373

sloboegen opened this issue Apr 16, 2022 · 6 comments · Fixed by #911
Labels
bug Issue/PR that involves a bug language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change

Comments

@sloboegen
Copy link

sloboegen commented Apr 16, 2022

Hi!

I found that JPlag v.3 misses some of the matches that JPlag v.2.12.1 finds. For example:

jplag-letter

JPlag3 breaks the match at lines with is Empty() / size() == 0, (int) a.get(i +1) / l.get(i + 1) and seems to skip matches due to presence/absence of braces. In my experiment, because of such behavior JPlag3 returned 10% similarity for a pair of plagiarized programs, while JPlag2 returned 70%. I used frontend for Java17 in the JPlag v.2.12.1.

Maybe the third version can be made a little less sensitive so that such matches can be found?

@tsaglam tsaglam added minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Apr 17, 2022
@tsaglam
Copy link
Member

tsaglam commented Apr 17, 2022

This might be an issue based on the difference between the java 1.7 frontend of the legacy version and the java frontend of JPlag v3. I will look into it. When running the legacy version with -l java19, does it still work?

@sloboegen
Copy link
Author

This might be an issue based on the difference between the java 1.7 frontend of the legacy version and the java frontend of JPlag v3. I will look into it. When running the legacy version with -l java19, does it still work?

Yes, it works. And I got the same matches missing problem when running legacy version with java19 frontend.

@tsaglam
Copy link
Member

tsaglam commented Apr 17, 2022

Ah, then the issue most likely lies in the token transfer, meaning what parts of the language AST are transformed into JPlag token. The two different Java frontends use different parsers and thus might vary. I will see what I can do!

@tsaglam tsaglam added the bug Issue/PR that involves a bug label Apr 17, 2022
@sloboegen
Copy link
Author

I have added frontend for Java 1.7 to JPlag v.3. Maybe it's worth opening a PR with these changes?

@tsaglam
Copy link
Member

tsaglam commented Apr 19, 2022

Currently, we do not want to go back to a multi-java-frontend system. However, this might change depending on the outcome of this issue.

@tsaglam
Copy link
Member

tsaglam commented Feb 13, 2023

Closed by #911.

@tsaglam tsaglam closed this as completed Feb 13, 2023
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 language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants