All Projects → jplag → JPlag

jplag / JPlag

Licence: GPL-3.0 license
Detecting Software Plagiarism and Collusion since 1996.

Programming Languages

java
68154 projects - #9 most used programming language
ANTLR
299 projects
rust
11053 projects
Vue
7211 projects
scala
5932 projects
typescript
32286 projects

Projects that are alternatives of or similar to JPlag

rust-code-analysis
Library to analyze and collect metrics on source code
Stars: ✭ 171 (-74.63%)
Mutual labels:  source-code-analysis
get-source
Fetch source-mapped sources. Peek by file, line, column. Node & browsers. Sync & async.
Stars: ✭ 26 (-96.14%)
Mutual labels:  source-code-analysis
objc-runtime-CN
Objective-C Runtime Analysis (Objective-C运行时分析)
Stars: ✭ 28 (-95.85%)
Mutual labels:  source-code-analysis
Guttenberg
A bot, searching for plagiarism on Stack Overflow.
Stars: ✭ 22 (-96.74%)
Mutual labels:  plagiarism-prevention
copyvios
A copyright violation detector running on Wikimedia Cloud Services
Stars: ✭ 32 (-95.25%)
Mutual labels:  plagiarism-prevention
Simple-Plagiarism-Checker
Web Application for checking the similarity between query and document using the concept of Cosine Similarity.
Stars: ✭ 47 (-93.03%)
Mutual labels:  plagiarism-detection
SA-Plag
Detect Plagiarism in competitive programmming
Stars: ✭ 13 (-98.07%)
Mutual labels:  plagiarism-detection
catch-me-if-you-can
plagiarism detector
Stars: ✭ 16 (-97.63%)
Mutual labels:  plagiarism-detection
dolos
🕵️ Source code plagiarism detection
Stars: ✭ 77 (-88.58%)
Mutual labels:  plagiarism-detection
Spring Analysis
Spring源码阅读
Stars: ✭ 11,249 (+1568.99%)
Mutual labels:  source-code-analysis
Jdk Sourcecode Analysis
JDK源码阅读笔记
Stars: ✭ 1,646 (+144.21%)
Mutual labels:  source-code-analysis
emerge
emerge is a source code analysis tool and dependency visualizer that can be used to gather insights about source code structure, metrics, dependencies and complexity of software projects. After scanning the source code of a project it provides you an interactive web interface to explore and analyze your project by using graph structures.
Stars: ✭ 120 (-82.2%)
Mutual labels:  source-code-analysis
import-graph
🕵🏻‍♂️ Collect data about your dependencies
Stars: ✭ 35 (-94.81%)
Mutual labels:  source-code-analysis
go-namecheck
Source code analyzer that helps you to maintain variable/field naming conventions inside your project.
Stars: ✭ 37 (-94.51%)
Mutual labels:  source-code-analysis
codeprep
A toolkit for pre-processing large source code corpora
Stars: ✭ 39 (-94.21%)
Mutual labels:  source-code-analysis
android-source-codes
⚙️ Code analysis of common Android projects and components.
Stars: ✭ 59 (-91.25%)
Mutual labels:  source-code-analysis

JPlag logo

JPlag - Detecting Software Plagiarism

CI Build Latest Release Maven Central License GitHub commit activity

JPlag is a system that finds similarities among multiple sets of source code files. This way it can detect software plagiarism and collusion in software development. JPlag currently supports various programming languages, EMF metamodels, and natural language text.

Supported Languages

In the following, a list of all supported languages with their supported language version is provided. A language can be selected from the command line using the -l <cli argument name> argument.

Language Version CLI Argument Name state parser
Java 17 java mature JavaC
C++ 11 cpp legacy JavaCC
C# 8 csharp beta ANTLR 4
Go 1.17 golang beta ANTLR 4
Kotlin 1.3 kotlin beta ANTLR 4
Python 3.6 python3 legacy ANTLR 4
R 3.5.0 rlang beta ANTLR 4
Rust 1.60.0 rust beta ANTLR 4
Scala 2.13.8 scala beta Scalameta
Scheme ? scheme unknown JavaCC
Swift 5.4 swift beta ANTLR 4
EMF Metamodel 2.25.0 emf alpha EMF
Text (naive) - text legacy CoreNLP

Download and Installation

Downloading a release

Via Maven

JPlag is released on Maven Central, it can be included as follows:

<dependency>
  <groupId>de.jplag</groupId>
  <artifactId>jplag</artifactId>
</dependency>

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.
  3. You will find the generated JARs in the subdirectory jplag.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.

CLI

Note that the legacy CLI is varying slightly.

positional arguments:
  rootDir                Root-directory with submissions to check for plagiarism

named arguments:
  -h, --help             show this help message and exit
  -new NEW [NEW ...]     Root-directory with submissions to check for plagiarism (same as the root directory)
  -old OLD [OLD ...]     Root-directory with prior submissions to compare against
  -l {cpp,csharp,emf,go,java,kotlin,python3,rlang,rust,scala,scheme,swift,text}
                         Select the language to parse the submissions (default: java)
  -bc BC                 Path of  the  directory  containing  the  base  code  (common  framework  used  in  all
                         submissions)
  -t T                   Tunes the comparison sensitivity by adjusting the  minimum token required to be counted
                         as a matching section. A smaller <n>  increases  the sensitivity but might lead to more
                         false-positives
  -n N                   The maximum number of comparisons that will  be  shown  in the generated report, if set
                         to -1 all comparisons will be shown (default: 100)
  -r R                   Name of the directory in which the comparison results will be stored (default: result)

Advanced:
  -d                     Debug parser. Non-parsable files will be stored (default: false)
  -s S                   Look in directories <root-dir>/*/<dir> for programs
  -p P                   comma-separated list of all filename suffixes that are included
  -x X                   All files named in this file will be ignored in the comparison (line-separated list)
  -m M                   Comparison similarity threshold [0.0-1.0]:  All  comparisons  above this threshold will
                         be saved (default: 0.0)

Clustering:
  --cluster-skip         Skips the clustering (default: false)
  --cluster-alg {AGGLOMERATIVE,SPECTRAL}
                         Which clustering algorithm to use. Agglomerative  merges similar submissions bottom up.
                         Spectral clustering is  combined  with  Bayesian  Optimization  to  execute the k-Means
                         clustering  algorithm  multiple   times,   hopefully   finding   a   "good"  clustering
                         automatically. (default: spectral)
  --cluster-metric {AVG,MIN,MAX,INTERSECTION}
                         The metric used for clustering. AVG  is  intersection  over  union, MAX can expose some
                         attempts of obfuscation. (default: MAX)

Java API

The new API makes it easy to integrate JPlag's plagiarism detection into external Java projects:

Language language = new de.jplag.java.Language();
Set<File> 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);

JPlag jplag = new JPlag(options);
try {
    JPlagResult result = jplag.run();
     
    // Optional
    ReportObjectFactory reportObjectFactory = new ReportObjectFactory();
    reportObjectFactory.createAndSaveReport(result, "/path/to/output");
} catch (ExitException e) {
    // error handling 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 [email protected] . 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!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].