Skip to content

Commit

Permalink
update section on report file generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Sep 15, 2024
1 parent 9a13195 commit 5b98e7d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/6.-Report-File-Generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ result.zip
│ submission2-submission....json
│ submission2-submissionN.json
│ ...
└───basecode
│ └───submissionId1.json
│ └───submissionId2.json
│ ...
```

The report zip contains
Expand All @@ -41,20 +46,21 @@ The report zip contains
- The `overview.json` encapsulates the main information from a JPlagResult such as base directory path, language, min- and max-metric, etc. The `overview.json` provides data to the `OverviewView.vue` that is first displayed after the report is dropped into the viewer. Corresponds to the Java record `OverviewReport`.

- submissionFileIndex.json
- The `submissionFileIndex.json` stores a list of all files in the submission for each submission id.
- The `submissionFileIndex.json` stores a list of all files in the submission for each submission id. This file is also used to track the tokens per file. It is represented by a Map from the submission id to an instance of `SubmissionFile`.

- options.json
- This File contains all options given to JPlag either over the CLI or programmatically
- This File contains all options given to JPlag either over the CLI or programmatically. It is represented diretly by the `JPlagOptions` class.

- submissions

- This folder contains all files of all submissions JPlag was run with. For each submission the `submissions` folder contains a subfolder with the name of the corresponding submission id. A subfolder for a submission contains all files of said submission.
These files are displayed in the `ComparisonView.vue`

- comparison files

- For each submission pair submission1 submission2 with ids submissionId1 and submissionId2, the report contains either submissionId1-submissionId2.json or submissionId2-submissionId1.json. This file contains information the comparison between the two submissions, such as the similarity and concrete matches. Corresponds to the Java record `ComparisonReport`.

- base code
- Each JSON file in the `basecode` folder contains the data where the provided basecode was found in each submission. Each submission has its own file. If no basecode was provided, each file contains an empty array of matches. Each JSON file corresponds to an array the Java record `BaseCodeMatch`.

## Submission ids

### Report Viewer
Expand Down Expand Up @@ -89,5 +95,5 @@ Task: Adding the number of tokens in a match, which has to be displayed in the M
2. Modify the existing component `ComparisonReportWriter.java` to additionally extract the number of tokens in a match from the `JPlagResult.java`
and save it in the Match DTO
3. Add `tokens: number` to `Match.ts`
4. Edit `ComparisonFactory.ts` to get the number of tokens from the JSON report file. [report-viewer]
5. Edit `MatchTable.vue` to display the tokens number in the `ComparisonView.vue`.
4. Edit `ComparisonFactory.ts` to get the number of tokens from the JSON report file.
5. Edit `MatchList.vue` to display the tokens number in the `ComparisonView.vue`.

0 comments on commit 5b98e7d

Please sign in to comment.