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

Development: Extract plagiarism detection service #7152

Merged
merged 29 commits into from
Sep 30, 2023

Conversation

jakubriegel
Copy link
Contributor

@jakubriegel jakubriegel commented Sep 7, 2023

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I followed the coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I documented the Java code using JavaDoc style.

Changes affecting Programming Exercises

  • I tested all changes and their related features with all corresponding user types on Test Server 1 (Atlassian Suite).
  • I tested all changes and their related features with all corresponding user types on Test Server 2 (Jenkins and Gitlab).

Motivation and Context

Plagiarism detection logic is distributed in controllers for each exercise type resources. This logic has a common domain and could be stored in a dedicated class. The current state will also require a copy&paste approach in case on implementing new triggers for plagiarism detection, like continuous plagiarism control.

Description

This PR introduces a common PlagiarismDetectionService which own all plagiarism checks related logic. This class is implemented using the code moved from ModelingExerciseResource, TextExerciseResource and ProgrammingExercisePlagiarismResource classes.

There is a new PlagarismDetectionConfig class, which holds the configuration for plagiarism checks. This is the first step that enables this config to be stored on the server, which will be necessary for the continuous plagiarism control in the future.

Steps for Testing

Prerequisites:

  • 1 Instructor and 2 Students
  • 1 programming, 1 modeling and 1 text exercise
  1. Create very similar submission to each of 3 exercises from both user accounts.
  2. Go to exercise manage page and click on Check plagiarism.
  3. Run plagiarism detection wich default settings.
  4. Verify that plagiarism results are shown.
  5. Run plagiarism detection wich similarity threshold changed to 100%.
  6. Verify that no plagiarism result is shown.

Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (assert/expect)
PlagiarismDetectionService 100%

@jakubriegel jakubriegel self-assigned this Sep 7, 2023
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) labels Sep 7, 2023
@jakubriegel jakubriegel marked this pull request as ready for review September 7, 2023 19:55
@jakubriegel jakubriegel requested a review from a team as a code owner September 7, 2023 19:55
@jakubriegel jakubriegel temporarily deployed to artemis-test4.artemis.cit.tum.de September 8, 2023 09:16 — with GitHub Actions Inactive
@MarkusPaulsen MarkusPaulsen added the maintainer-approved The feature maintainer has approved the PR label Sep 16, 2023
MarkusPaulsen
MarkusPaulsen previously approved these changes Sep 16, 2023
Copy link
Contributor

@MarkusPaulsen MarkusPaulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good + Tested on TS1

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Sep 30, 2023
@jakubriegel jakubriegel changed the title Plagiarism detection: Extract plagiarism detection service Plagiarism checks: Extract plagiarism detection service Sep 30, 2023
@jakubriegel jakubriegel changed the title Plagiarism checks: Extract plagiarism detection service Development: Extract plagiarism detection service Sep 30, 2023
@krusche krusche added this to the 6.5.4 milestone Sep 30, 2023
@krusche krusche merged commit 0f16882 into develop Sep 30, 2023
@krusche krusche deleted the extract-plagiarism-detection-service branch September 30, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) maintainer-approved The feature maintainer has approved the PR ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants