Skip to content

Commit

Permalink
Improved naming
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoOfTwelve committed Oct 30, 2023
1 parent 5c0142f commit fe76d8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/main/java/de/jplag/GreedyStringTiling.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ public final JPlagComparison generateBaseCodeMarking(Submission submission, Subm
public final JPlagComparison compare(Submission firstSubmission, Submission secondSubmission) {
Submission smallerSubmission;
Submission largerSubmission;
Comparator<Submission> comp = Comparator.comparing((Submission s) -> s.getTokenList().size()).thenComparing(Submission::getName);
if (comp.compare(firstSubmission, secondSubmission) <= 0) {
Comparator<Submission> submissionComparator = Comparator.comparing((Submission it) -> it.getTokenList().size())
.thenComparing(Submission::getName);

if (submissionComparator.compare(firstSubmission, secondSubmission) <= 0) {
smallerSubmission = firstSubmission;
largerSubmission = secondSubmission;
} else {
Expand Down

0 comments on commit fe76d8e

Please sign in to comment.