Skip to content

Commit

Permalink
handle eof token
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Feb 1, 2024
1 parent 75fa0a5 commit e3381f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ private void writeSubmissionIndexFile(JPlagResult result, String path) {
for (Submission submission : submissions) {
Map<String, Integer> tokenCounts = new HashMap<>();
for (Token token : submission.getTokenList()) {
if (token.getType().isExcludedFromMatching()) {
continue;
}
String key = FilePathUtil.getRelativeSubmissionPath(token.getFile(), submission, submissionToIdFunction);
if (tokenCounts.containsKey(key)) {
tokenCounts.put(key, tokenCounts.get(key) + 1);
Expand Down
2 changes: 1 addition & 1 deletion report-viewer/src/components/fileDisplaying/CodePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class="font-normal"
>
<template #default
>{{ ((file.matchedTokenCount / file.tokenCount) * 100).toFixed(2) }}%</template
>{{ ((file.matchedTokenCount / (file.tokenCount - 1)) * 100).toFixed(2) }}%</template
>
<template #tooltip
><p class="whitespace-nowrap text-sm">
Expand Down

0 comments on commit e3381f3

Please sign in to comment.