fork的Jplag源码。掺杂了部分修改。

Timur Sağlam 42fe413a3c Clarify options by improving JDoc comments. 5 years ago
.github fbc6135ae9 Dependency(deps): Bump actions/checkout from 2.3.5 to 2.4.0 5 years ago
jplag 42fe413a3c Clarify options by improving JDoc comments. 5 years ago
jplag.frontend-utils a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.chars a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.cpp a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.csharp-1.2 a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.java-1.1exp a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.java-1.2 a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.java-1.5 a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.java-1.7 a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.java-1.9 a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.python-3 a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.scheme a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.frontend.text a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
jplag.parent a5d4111637 Ensure consistent formatting of the pom files. 5 years ago
.gitignore ed7e486f8f Add possibility to generate a report of the jplag result 6 years ago
LICENSE 15959fff5c Add license 11 years ago
README.md ea6b5a3eb7 Update README.md 5 years ago
UMLClassDiagram.png 72ab94c039 Fix method signature in the class diagram. 5 years ago
pom.xml c9a1024f45 Remove unused utility project. 5 years ago

README.md

JPlag logo

JPlag - Detecting Software Plagiarism

Maven Workflow Latest Release License

Download and Installation

Downloading a release

Building from sources

  1. Download or clone the code from this repository.
  2. Run mvn clean install from the root of the repository to install all submodules. You will find the JARs in the respective target directories.
  3. Inside the jplag directory run mvn clean generate-sources package.

You will find the generated JAR with all dependencies in jplag/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.

JPlag - Detecting Software Plagiarism

Usage: JPlag [ options ] [<root-dir>]
 <root-dir>        The root-directory that contains all submissions

named arguments:
  -h, --help             show this help message and exit
  -l                     {java1,java2,java5,java5dm,java7,java9,python3,cpp,csharp,char,text,scheme} Select the language to parse the submissions (Standard: java9)
  -bc BC                 Name of the directory which contains the base code (common framework used in all submissions)
  -v                     {quiet,long} Verbosity of the logging (Standard: quiet)
  -d                     (Debug) parser. Non-parsable files will be stored (Standard: 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)
  -t T                   Tune the sensitivity of the comparison. A smaller <n> increases the sensitivity
  -m M                   Match similarity Threshold [0-100]: All matches above this threshold will be saved (Standard: 0.0)
  -n N                   Maximum number of matches that will be saved. If set to -1 all matches will be saved (Standard: 30)
  -r R                   Name of the directory in which the comparison results will be stored (Standard: result)
  -c {normal,parallel}   Comparison mode used to compare the programs (Standard: normal)

Java API

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

JPlagOptions options = new JPlagOptions("/path/to/rootDir", LanguageOption.JAVA_1_9);
options.setBaseCodeSubmissionName("template");

JPlag jplag = new JPlag(options);
JPlagResult result = jplag.run();

List<JPlagComparison> comparisons = result.getComparisons();

// Optional
File outputDir = new File("/path/to/output");
Report report = new Report(outputDir);

report.writeResult(result);

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!