Skip to content

Add Java CPG language module#2835

Open
robinmaisch wants to merge 48 commits intodevelopfrom
feature/java-cpg
Open

Add Java CPG language module#2835
robinmaisch wants to merge 48 commits intodevelopfrom
feature/java-cpg

Conversation

@robinmaisch
Copy link
Copy Markdown
Member

This PR contains a Java module based on the Fraunhofer AISEC CPG framework. This module was designed by @robinmaisch and updated to version 8.3.0 of CPG by @LundiNord.

It enables structural normalization with respect to syntactic alternatives, thereby mitigating a range of typical refactoring attacks on software plagiarism detection systems such as JPlag.

robinmaisch and others added 30 commits December 29, 2023 11:55
Content:
 - A new CPG language frontend for JPlag
 - An interface to transform submissions into CPGs
 - An interface to transform CPGs into token lists
 - A Graph Transformation Engine (to be extended)
   . interfaces representing node and graph patterns, matches of these patterns, transformations
   . an isomorphism detector
   . a transformation algorithm
 - Some graph transformations (to be extended)
- implemented multi-root graph patterns
- implemented searching for "all matches at once"
- GraphOperations should leave EOG intact
- implemented new kinds of edges and properties for graph patterns
- tokenization works well
- implemented DFG sort pass
-- this requires specialized treatment for all kinds of language features. Surely the considered feature set is incomplete.
It was designed for local use.
Add many comments and put a file in the 'passes' package. When JavaDoc cannot find a Java file in there, it quits.
LundiNord and others added 8 commits December 23, 2025 12:32
Javadoc fails on packages which only contain Kotlin classes, as those packages are not accessible to Javadoc. Thus, Javadoc is now configured to not fail on error for the java-cpg language module.
Add Java-cpg language module with cpg version 8.3.0
@robinmaisch
Copy link
Copy Markdown
Member Author

@copilot

Copy link
Copy Markdown

Copilot AI commented Feb 20, 2026

@robinmaisch I've opened a new pull request, #2836, to work on those changes. Once the pull request is ready, I'll request review from you.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 5, 2026

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants