jplag / JPlag

State-of-the-Art Software Plagiarism & Collusion Detection
https://jplag.github.io/JPlag/
GNU General Public License v3.0
1.37k stars 313 forks source link

Character precise matches #1695

Closed Kr0nox closed 5 months ago

Kr0nox commented 5 months ago

Previously JPlag could only display matches per line. This made it difficult to see where some matches ended and could even hide matches entirely. This PR adds information to the report and displays it, so matches are highlighted character precise. This PR is backwards compatible with 5.0.0

When writing the comparison report, JPlag now adds information about the start and end column to each match. The report viewer reads that information and saves it. Code displaying was reworked, so that each line is now its own component. This component calculates which parts of the line need to be highlighted accordingly.

The columns might not be calculated correctly in some language modules, that save start and length not correctly when parsing.

grafik

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'JPlag Report Viewer'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed for 'JPlag Plagiarism Detector'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud