JPlag icon indicating copy to clipboard operation
JPlag copied to clipboard

Add Java-CPG language module

Open robinmaisch opened this issue 11 months ago • 4 comments

This Draft PR contains the new "Java Code Property Graph" module. It uses a CPG library and graph transformations to normalise substructures of the code prior to tokenization, which should lead to a higher resilience against refactoring attacks.

It also serves to fix SonarCloud errors before a proper PR is opened.

robinmaisch avatar Mar 19 '24 18:03 robinmaisch

For this commit, some SonarCloud checks are going to fail because of code that was not part of my frontend and that I did not intend to touch in the first place. The issue is that a rule deems wildcard type arguments highly critical in return types, but that makes working with nested generic types very hard, like the method List<LanguageOption<?>> getOptionsAsList() in LanguageOptions. I wonder if there is a way for you to review/accept this commit even if these checks fail.

Edit: Well, what do you know, it did pass 😊

robinmaisch avatar Mar 26 '24 14:03 robinmaisch

Please also add the language to the report viewer here: https://github.com/jplag/JPlag/blob/develop/report-viewer/src/model/Language.ts

Also set a language for highlighting here: https://github.com/jplag/JPlag/blob/develop/report-viewer/src/utils/CodeHighlighter.ts

Kr0nox avatar Mar 28 '24 17:03 Kr0nox

I think I got rid of all unwanted changes to base code. I'm still fixing some bugs with new test submission files that I got, but the overall structure and basic workflow of the frontend should be stable now. @tsaglam, I think the reviewers can start.

robinmaisch avatar Apr 02 '24 12:04 robinmaisch

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

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Apr 03 '24 19:04 sonarqubecloud[bot]