https://github.com/jplag/JPlag Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} jplag / JPlag Public * Notifications You must be signed in to change notification settings * Fork 294 * Star 1.1k State-of-the-Art Software Plagiarism & Collusion Detection jplag.github.io/jplag/ License GPL-3.0 license 1.1k stars 294 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 44 * Pull requests 13 * Discussions * Actions * Wiki * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Wiki * Security * Insights jplag/JPlag This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 3,929 Commits .github .github .mvn .mvn cli cli core core coverage-report coverage-report docs docs endtoend-testing endtoend-testing language-antlr-utils language-antlr-utils language-api language-api language-testutils language-testutils languages languages report-viewer report-viewer .gitattributes .gitattributes .gitignore .gitignore LICENSE LICENSE README.md README.md formatter.xml formatter.xml package-lock.json package-lock.json pom.xml pom.xml spotless.importorder spotless.importorder View all files Repository files navigation * README * GPL-3.0 license JPlag logo JPlag - Detecting Software Plagiarism CI Build Latest Release Maven Central License GitHub commit activity SonarCloud Coverage Report Viewer Java Version JPlag finds pairwise similarities among a set of multiple programs. It can reliably detect software plagiarism and collusion in software development, even when obfuscated. All similarities are calculated locally, and no source code or plagiarism results are ever uploaded to the internet. JPlag supports a large number of programming and modeling languages. * JPlag Demo * [?] JPlag on Helmholtz RSD * Give us Feedback in a short (<5 min) survey Supported Languages All supported languages and their supported versions are listed below. Language Version CLI Argument Name state parser Java 21 java mature JavaC C 11 c legacy JavaCC C++ 14 cpp beta ANTLR 4 C# 6 csharp mature ANTLR 4 Python 3.6 python3 beta ANTLR 4 JavaScript ES6 javascript beta ANTLR 4 TypeScript ~5 typescript beta ANTLR 4 Go 1.17 golang beta ANTLR 4 Kotlin 1.3 kotlin beta ANTLR 4 R 3.5.0 rlang beta ANTLR 4 Rust 1.60.0 rust beta ANTLR 4 Swift 5.4 swift beta ANTLR 4 Scala 2.13.8 scala beta Scalameta LLVM IR 15 llvmir beta ANTLR 4 Scheme ? scheme legacy JavaCC EMF Metamodel 2.25.0 emf beta EMF EMF Model 2.25.0 emf-model alpha EMF SCXML 1.0 scxml alpha XML Text (naive) - text legacy CoreNLP Download and Installation You need Java SE 21 to run or build JPlag. Downloading a release * Download a released version. * In case you depend on the legacy version of JPlag we refer to the legacy release v2.12.1 and the legacy branch. Via Maven JPlag is released on Maven Central, it can be included as follows: de.jplag jplag Building from sources 1. Download or clone the code from this repository. 2. Run mvn clean package from the root of the repository to compile and build all submodules. Run mvn clean package assembly:single instead if you need the full jar which includes all dependencies. Run mvn -P with-report-viewer clean package assembly:single to build the full jar with the report viewer. In this case, you'll need Node.js installed. 3. You will find the generated JARs in the subdirectory cli/target. Usage JPlag can either be used via the CLI or directly via its Java API. For more information, see the usage information in the wiki. If you are using the CLI, you can display your results via jplag.github.io. No data will leave your computer! CLI Note that the legacy CLI is varying slightly. The language can either be set with the -l parameter or as a subcommand (jplag [jplag options] [language options]). A subcommand takes priority over the -l option. When using the subcommand, language-specific arguments can be set. A list of language-specific options can be obtained by requesting the help page of a subcommand (e.g. jplag java -h). Parameter descriptions: [root-dirs[,root-dirs...]...] Root-directory with submissions to check for plagiarism. -bc, --bc, --base-code= Path to the base code directory (common framework used in all submissions). -l, --language= Select the language of the submissions (default: java). See subcommands below. -M, --mode=<{RUN, VIEW, RUN_AND_VIEW}> The mode of JPlag: either only run analysis, only open the viewer, or do both (default: null) -n, --shown-comparisons= The maximum number of comparisons that will be shown in the generated report, if set to -1 all comparisons will be shown (default: 500) -new, --new=[,...] Root-directories with submissions to check for plagiarism (same as root). --normalize Activate the normalization of tokens. Supported for languages: Java, C++. -old, --old=[,...] Root-directories with prior submissions to compare against. -r, --result-file= Name of the file in which the comparison results will be stored (default: results). Missing .zip endings will be automatically added. -t, --min-tokens= Tunes the comparison sensitivity by adjusting the minimum token required to be counted as a matching section. A smaller value increases the sensitivity but might lead to more false-positives. Advanced --csv-export Export pairwise similarity values as a CSV file. -d, --debug Store on-parsable files in error folder. -m, --similarity-threshold= Comparison similarity threshold [0.0-1.0]: All comparisons above this threshold will be saved (default: 0.0). -p, --suffixes=[,...] comma-separated list of all filename suffixes that are included. -P, --port= The port used for the internal report viewer (default: 1996). -s, --subdirectory= Look in directories /*/ for programs. -x, --exclusion-file= All files named in this file will be ignored in the comparison (line-separated list). Clustering --cluster-alg, --cluster-algorithm=<{AGGLOMERATIVE, SPECTRAL}> Specifies the clustering algorithm (default: spectral). --cluster-metric=<{AVG, MIN, MAX, INTERSECTION}> The similarity metric used for clustering (default: average similarity). --cluster-skip Skips the cluster calculation. Subsequence Match Merging --gap-size= Maximal gap between neighboring matches to be merged (between 1 and minTokenMatch, default: 6). --match-merging Enables merging of neighboring matches to counteract obfuscation attempts. --neighbor-length= Minimal length of neighboring matches to be merged (between 1 and minTokenMatch, default: 2). Subcommands (supported languages): c cpp csharp emf emf-model go java javascript kotlin llvmir python3 rlang rust scala scheme scxml swift text typescript Java API The new API makes it easy to integrate JPlag's plagiarism detection into external Java projects: Language language = new JavaLanguage(); Set submissionDirectories = Set.of(new File("/path/to/rootDir")); File baseCode = new File("/path/to/baseCode"); JPlagOptions options = new JPlagOptions(language, submissionDirectories, Set.of()).withBaseCodeSubmissionDirectory(baseCode); try { JPlagResult result = JPlag.run(options); // Optional ReportObjectFactory reportObjectFactory = new ReportObjectFactory(new File("/path/to/output")); reportObjectFactory.createAndSaveReport(result); } catch (ExitException e) { // error handling here } catch (FileNotFoundException e) { // handle IO exception here } Contributing We're happy to incorporate all improvements to JPlag into this codebase. Feel free to fork the project and send pull requests. Please consider our guidelines for contributions. Contact If you encounter bugs or other issues, please report them here. For other purposes, you can contact us at jplag@ipd.kit.edu . If you are doing research related to JPlag, we would love to know what you are doing. Feel free to contact us! More information can be found in our Wiki! About State-of-the-Art Software Plagiarism & Collusion Detection jplag.github.io/JPlag/ Topics plagiarism-prevention plagiarism plagiarism-detection source-code-analysis plagiarism-check collusion-detection software-plagiarism Resources Readme License GPL-3.0 license Activity Custom properties Stars 1.1k stars Watchers 25 watching Forks 294 forks Report repository Releases 11 v5.1.0 Latest May 23, 2024 + 10 releases Packages 0 No packages published Contributors 45 * @tsaglam * @dependabot[bot] * @Kr0nox * @dfuchss * @TwoOfTwelve * @sebinside * @robinmaisch * @SimDing * @cholakov11 * @nestabentum * @cyfml * @SirYwell * @SuyDesignz * @brodmo + 31 contributors Languages * Java 60.0% * ANTLR 14.5% * Rust 5.0% * Vue 5.0% * C++ 5.0% * TypeScript 4.3% * Other 6.2% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.