Git Product home page Git Product logo

jplag / jplag Goto Github PK

View Code? Open in Web Editor NEW
955.0 24.0 284.0 53.6 MB

State-of-the-Art Software Plagiarism & Collusion Detection

Home Page: https://jplag.github.io/JPlag/

License: GNU General Public License v3.0

Java 60.28% HTML 0.03% ANTLR 14.52% Scheme 0.36% JavaScript 0.13% Vue 4.56% TypeScript 4.17% C# 1.43% R 0.14% Kotlin 0.17% Go 0.12% Scala 1.70% Rust 5.10% Swift 0.12% C++ 5.04% LLVM 0.29% Python 1.81% CSS 0.03%
plagiarism-detection collusion-detection plagiarism-check plagiarism-prevention source-code-analysis software-plagiarism plagiarism

jplag's Introduction

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.

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 legacy 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

Via Maven

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

<dependency>
  <groupId>de.jplag</groupId>
  <artifactId>jplag</artifactId>
  <version><!--desired version--></version>
</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. 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 name> [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=<baseCode>
                        Path to the base code directory (common framework used in all submissions).
  -l, --language=<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=<shownComparisons>
                        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=<newDirectories>[,<newDirectories>...]
                        Root-directories with submissions to check for plagiarism (same as root).
      --normalize       Activate the normalization of tokens. Supported for languages: Java, C++.
      -old, --old=<oldDirectories>[,<oldDirectories>...]
                        Root-directories with prior submissions to compare against.
  -r, --result-file=<resultFile>
                        Name of the file in which the comparison results will be stored (default: results). Missing .zip endings will be automatically added.
  -t, --min-tokens=<minTokenMatch>
                        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=<similarityThreshold>
                        Comparison similarity threshold [0.0-1.0]: All comparisons above this threshold will be saved (default: 0.0).
  -p, --suffixes=<suffixes>[,<suffixes>...]
                        comma-separated list of all filename suffixes that are included.
  -P, --port=<port>     The port used for the internal report viewer (default: 1996).
  -s, --subdirectory=<subdirectory>
                        Look in directories <root-dir>/*/<dir> for programs.
  -x, --exclusion-file=<exclusionFileName>
                        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=<maximumGapSize>
                        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=<minimumNeighborLength>
                        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<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);

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 [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!

jplag's People

Contributors

alberth289346 avatar brodmo avatar cholakov11 avatar cyfml avatar dependabot[bot] avatar dfuchss avatar drmichaelpetter avatar janwittler avatar jazerix avatar jtotht avatar kr0nox avatar lama0206 avatar nestabentum avatar niklasheneka avatar olmokramer avatar ov7a avatar pascalkrieg avatar philippbauch avatar robinmaisch avatar sdk2 avatar sebinside avatar simding avatar sirywell avatar smjonas avatar suydesignz avatar tobhey avatar tsaglam avatar twooftwelve avatar uuqjz avatar waynetee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jplag's Issues

Ignore or support BOM

BOM causes this error:
Lexical error at line 1, column 1. Encountered: "\ufeff" (65279), after : ""

The build could not read 2 projects

Hi,

I’m not versed in the world of Java package building, but following the instructions, this fails here:

~/build/jplag $ mvn clean generate-sources assembly:assembly
[INFO] Scanning for projects...
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]   
[ERROR]   The project edu.kit.ipd.jplag:java-1.7:0.0.1-SNAPSHOT (/home/jojo/build/jplag/jplag.frontend.java-1.7/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:java-1.5:jar is missing. @ line 88, column 15
[ERROR]   
[ERROR]   The project edu.kit.ipd.jplag:jplag:2.11.8-SNAPSHOT (/home/jojo/build/jplag/jplag/pom.xml) has 8 errors
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:java-1.1exp:jar is missing. @ line 187, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:text:jar is missing. @ line 195, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:java-1.5:jar is missing. @ line 199, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:java-1.7:jar is missing. @ line 203, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:csharp-1.2:jar is missing. @ line 207, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:cpp:jar is missing. @ line 211, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:scheme:jar is missing. @ line 215, column 15
[ERROR]     'dependencies.dependency.version' for edu.kit.ipd.jplag:chars:jar is missing. @ line 219, column 15
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

What am I missing?

`mvn clean generate-sources assembly:assembly` fails to build

When trying to build jplag with mvn clean generate-sources assembly:assembly as described in the README.md it fails with the following error:

[INFO] Reactor Summary:
[INFO] 
[INFO] JPlag Plagiarism Detector .......................... SUCCESS [  0.065 s]
[INFO] frontend-utils ..................................... SUCCESS [  0.007 s]
[INFO] chars .............................................. SUCCESS [  0.004 s]
[INFO] cpp ................................................ SUCCESS [  0.361 s]
[INFO] csharp-1.2 ......................................... SUCCESS [  0.342 s]
[INFO] java-1.1exp ........................................ SUCCESS [  0.248 s]
[INFO] java-1.2 ........................................... SUCCESS [  0.434 s]
[INFO] java-1.5 ........................................... SUCCESS [  0.387 s]
[INFO] java-1.7 ........................................... SUCCESS [  1.152 s]
[INFO] scheme ............................................. SUCCESS [  0.435 s]
[INFO] text ............................................... SUCCESS [  0.108 s]
[INFO] utils .............................................. SUCCESS [  0.004 s]
[INFO] jplag .............................................. SUCCESS [  0.594 s]
[INFO] JPlag Aggregator ................................... FAILURE [ 10.763 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.729 s
[INFO] Finished at: 2016-05-17T14:46:36+02:00
[INFO] Final Memory: 113M/710M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project aggregator: Error reading assemblies: No assembly descriptors found. -> [Help 1]

When running mvn with -e it reports

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project aggregator: Error reading assemblies: No assembly descriptors found. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project aggregator: Error reading assemblies: No assembly descriptors found.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error reading assemblies: No assembly descriptors found.
        at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:356)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
Caused by: org.apache.maven.plugin.assembly.io.AssemblyReadException: No assembly descriptors found.
        at org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.readAssemblies(DefaultAssemblyReader.java:206)
        at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:352)
        ... 22 more

Integrating JPLAG into other projects

Hi,

For a code grading system we are building we want to integrate plagiarism checkers such as JPLAG. However as shelling out to external tools is less than optimal we would like to use some sort of internal API. Is there such an internal API that is stable and supported in JPLAG?

Unable to build, ipdNexus repository 503 error

Hi,

I am having problems building JPlag.

During the build all downloads from the ipdNexus repository fail.

Any help would be greatly appreciated.

Kind regards,
Gary

$ mvn clean generate-sources assembly:assembly
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< edu.kit.ipd.jplag:jplag >-----------------------
[INFO] Building jplag 2.11.9-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jplag ---
[INFO] Deleting /usr/src/mymaven/jplag/target
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-antlr-source) @ jplag ---
[INFO] Source directory: /usr/src/mymaven/jplag/target/generated-sources/antlr added.
[INFO] Source directory: /usr/src/mymaven/jplag/target/generated-sources/javacc added.
[INFO]
[INFO] --- javacc-maven-plugin:2.6:javacc (javacc) @ jplag ---
Java Compiler Compiler Version 5.0 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file /usr/src/mymaven/jplag/src/main/javacc/filter.jj . . .
File "TokenMgrError.java" does not exist. Will create one.
File "ParseException.java" does not exist. Will create one.
File "Token.java" does not exist. Will create one.
File "JavaCharStream.java" does not exist. Will create one.
Parser generated successfully.
[INFO] Processed 1 grammar
[INFO]
[INFO] ----------------------< edu.kit.ipd.jplag:jplag >-----------------------
[INFO] Building jplag 2.11.9-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.4:assembly (default-cli) > package @ jplag >>>
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/frontend-utils/0.0.3-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:frontend-utils:0.0.3-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/frontend-utils/0.0.3-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:frontend-utils:0.0.3-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:frontend-utils:0.0.3-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/frontend-utils/0.0.3-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/frontend-utils/0.0.3-SNAPSHOT/frontend-utils-0.0.3-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.1exp/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:java-1.1exp:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.1exp/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:java-1.1exp:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:java-1.1exp:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.1exp/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.1exp/0.0.1-SNAPSHOT/java-1.1exp-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/utils/0.0.3-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:utils:0.0.3-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/utils/0.0.3-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:utils:0.0.3-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:utils:0.0.3-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/utils/0.0.3-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/utils/0.0.3-SNAPSHOT/utils-0.0.3-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/text/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:text:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/text/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:text:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:text:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/text/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/text/0.0.1-SNAPSHOT/text-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.5/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:java-1.5:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.5/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:java-1.5:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:java-1.5:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.5/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.5/0.0.1-SNAPSHOT/java-1.5-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.7/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:java-1.7:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.7/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:java-1.7:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:java-1.7:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.7/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/java-1.7/0.0.1-SNAPSHOT/java-1.7-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/python-3/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:python-3:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/python-3/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:python-3:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:python-3:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/python-3/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/python-3/0.0.1-SNAPSHOT/python-3-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/csharp-1.2/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:csharp-1.2:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/csharp-1.2/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:csharp-1.2:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:csharp-1.2:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/csharp-1.2/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/csharp-1.2/0.0.1-SNAPSHOT/csharp-1.2-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:cpp:0.0.2-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:cpp:0.0.2-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:cpp:0.0.2-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/cpp-0.0.2-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/scheme/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:scheme:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/scheme/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:scheme:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:scheme:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/scheme/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/scheme/0.0.1-SNAPSHOT/scheme-0.0.1-SNAPSHOT.pom
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/chars/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata edu.kit.ipd.jplag:chars:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/chars/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[WARNING] Failure to transfer edu.kit.ipd.jplag:chars:0.0.1-SNAPSHOT/maven-metadata.xml from http://bob.ipd.kit.edu/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced. Original error: Could not transfer metadata edu.kit.ipd.jplag:chars:0.0.1-SNAPSHOT/maven-metadata.xml from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/chars/0.0.1-SNAPSHOT/maven-metadata.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
Downloading from ipdNexus: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/chars/0.0.1-SNAPSHOT/chars-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.716 s
[INFO] Finished at: 2018-10-16T00:04:17Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jplag: Could not resolve dependencies for project edu.kit.ipd.jplag:jplag:jar:2.11.9-SNAPSHOT: Failed to collect dependencies at edu.kit.ipd.jplag:frontend-utils:jar:0.0.3-SNAPSHOT: Failed to read artifact descriptor for edu.kit.ipd.jplag:frontend-utils:jar:0.0.3-SNAPSHOT: Could not transfer artifact edu.kit.ipd.jplag:frontend-utils:pom:0.0.3-SNAPSHOT from/to ipdNexus (http://bob.ipd.kit.edu/nexus/content/repositories/public/): Failed to transfer file: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/frontend-utils/0.0.3-SNAPSHOT/frontend-utils-0.0.3-SNAPSHOT.pom. Return code is: 503 , ReasonPhrase:Service Unavailable. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Can't add support for python 2.7

I added python front end to the project. I had javacc grammers so I made the front end in a similar way to cpp front end.

I also edited pom files in jplag-master and jplag.parent folders, and added my new python language in the same way cpp was added.

After that, I built a jar-with-dependencies file, but when I try to run the following cmd command:

java -jar jplag-2.11.8-SNAPSHOT.jar -l python -r /answers/ -s /examples/

I get an error that says python language is unknown. Did I miss anything? how can I add python to run using the above command. If I can't do that, how can I work with my added python language?

Can not build the project - Failing dependencies.

I do

~/GIT/jplag/jplag$ mvn clean generate-sources package

and get this

[ERROR] Failed to execute goal on project jplag: 
Could not resolve dependencies for project edu.kit.ipd.jplag:jplag:jar:2.12.1-SNAPSHOT: 
The following artifacts could not be resolved: 
edu.kit.ipd.jplag:frontend-utils:jar:0.0.3-SNAPSHOT, 
edu.kit.ipd.jplag:java-1.1exp:jar:0.0.1-SNAPSHOT,
 edu.kit.ipd.jplag:utils:jar:0.0.3-SNAPSHOT, 
edu.kit.ipd.jplag:text:jar:0.0.1-SNAPSHOT,
 edu.kit.ipd.jplag:java-1.5:jar:0.0.1-SNAPSHOT, 
edu.kit.ipd.jplag:java-1.7:jar:0.0.1-SNAPSHOT,
 edu.kit.ipd.jplag:java-1.9:jar:0.0.1-SNAPSHOT, 
edu.kit.ipd.jplag:python-3:jar:0.0.1-SNAPSHOT, 
edu.kit.ipd.jplag:csharp-1.2:jar:0.0.1-SNAPSHOT, 
edu.kit.ipd.jplag:cpp:jar:0.0.2-SNAPSHOT, 
edu.kit.ipd.jplag:scheme:jar:0.0.1-SNAPSHOT,
 edu.kit.ipd.jplag:chars:jar:0.0.1-SNAPSHOT: Could not find artifact edu.kit.ipd.jplag:frontend-utils:jar:0.0.3-SNAPSHOT in ipdNexus (http://bob.ipd.kit.edu/nexus/repository/maven-public-all) -> [Help 1]

It seems that repository is down

Nexus Repository Manager
OSS 3.15.2-01
Exclamation point
Error 400 Bad Request


I have two Questions:

  1. Where can I get the missing Jar files? Could you publish them somewhere that we can access them?

  2. With which Java version is the latest released compiled? I mean this last release the following v2.12.1-SNAPSHOT released this on Mar 25 - version to 2.12.1-SNAPSHOT

Thank you very much for your help.

Update README.md

Dear JPlag Team,
the excluding -x option is not very clearly described and to get it working I had to look into the source code (luckily it's open source :P):
https://github.com/jplag/jplag/blob/3934c8c3d4147f72daadcbec93074fc66737b344/jplag/src/main/java/jplag/Program.java Line: 481
It would be more helpful and probably save other people some time, if it is clearified that the option expects a file containing names, which will be excluded based on their name ending. I had a hard time trying it with absolute and relative paths.

Regards,
Timo

Java 1.8 support

Thanks for this great tool. Any chance support for java 1.8 will be added? The program seems to work reasonable fine on java 1.8 code with the -l java17 flag, but I (and probably my students as well) would like to be sure the reports are valid.

Can I run JPLAG as local? without connecting to the internet?

I'm sorry but I couldn't quite understand this point when it's mentioned on the "Web Service" section.
So, can I run JPLAG as local? or this project is used to actually send tokens to JPLAG server over the internet, and then get the results back?

C/C++ false negative with for loops vs while loops

I'm not sure whether this is an inherent limitation of the parser, or whether it's something that can be improved.

This is an anonymised example of some code that wasn't flagged as a match:

File 1:

for (x = 0; x < 10; x++) {
    for (y = 0; y < 20; y++) {
        // removed: 3 lines of character-for-character identical code
        // which involved creating/updating local variables and calling functions
    }
}

File 2:

while (x < 10) {
    y = 0;
    while (y < 20) {
        // removed: 3 lines of character-for-character identical code
        // which involved creating/updating local variables and calling functions
        y++;
    }
    x++;
}

In this specific instance, there were 15 lines of identical code before this snippet (which were flagged), then the code above, followed by 10 identical lines (which weren't flagged, due to being less than the threshold), followed by another nested while/for loop.

I can construct a larger example to illustrate if necessary.

Python3 syntactically incorrect programs are not included

A Python3 program with any syntactical error is not included in comparisons which is very annoying. If you have a class in which some students attempted to copy and modify programs, but made some mistake, it might not be detected.

As a matter of fact, if syntactically incorrect programs were included, the same front end would work reasonably well for Python2 programs.

NoClassDefFoundError: jplag/ProgramI

Seem to be getting a "NoClassDefFoundError: jplag/ProgramI" error when running after building with maven. No build errors from maven, just the above when i try to run it.

This is using the .jar in jplag\target - similar thing happens when running the other .jar files but im not sure if this is the same issue or something else.

Any help would be greatly appreciated.

different language

Is it possible to compare different languages ? In case if I want to check only the logic. May be this is not a issue just a question.
Example: If my directory contains both Java and c/c++ code, I want to know whether jplag compares two languages.
I could see that I can specify only one language and I should have only Java files in the directory in case I am checking Java files.
java -jar jplag-2.11.9-SNAPSHOT\jplag\target\jplag-0.0.3-SNAPSHOT.jar -l java17 -r results -s res1

Can't import anything from jplagWsClient.jplagClient.* ?

I am trying to set up jplag in Eclipse, and am not able to do so because many files depend on imports from jplagWsClient.jplagClient.* for example:

import jplagWsClient.jplagClient.JPlagException;
import jplagWsClient.jplagClient.JPlagService_Impl;
import jplagWsClient.jplagClient.JPlagTyp_Stub;
import jplagWsClient.jplagClient.LanguageInfo;
import jplagWsClient.jplagClient.Option;
import jplagWsClient.jplagClient.ServerInfo;
import jplagWsClient.jplagClient.Status;
import jplagWsClient.jplagClient.Submission;
import jplagWsClient.jplagClient.UserInfo;

However, I can't find any classes with those names or any packages named jplagWsClient.jplagClient in the sources provided here on github. Am I doing something wrong?

Unable to build

when I followed the README, tried to build jplag using mvn clean generate-sources package under the base directory, error occurred as following:
[INFO] Reactor Summary:
[INFO]
[INFO] JPlag Plagiarism Detector 0.3-SNAPSHOT ............. SUCCESS [ 0.114 s]
[INFO] frontend-utils 0.0.3-SNAPSHOT ...................... FAILURE [ 0.285 s]
[INFO] chars 0.0.1-SNAPSHOT ............................... SKIPPED
[INFO] cpp 0.0.2-SNAPSHOT ................................. SKIPPED
[INFO] csharp-1.2 0.0.1-SNAPSHOT .......................... SKIPPED
[INFO] java-1.1exp 0.0.1-SNAPSHOT ......................... SKIPPED
[INFO] java-1.2 0.0.1-SNAPSHOT ............................ SKIPPED
[INFO] java-1.5 0.0.1-SNAPSHOT ............................ SKIPPED
[INFO] java-1.7 0.0.1-SNAPSHOT ............................ SKIPPED
[INFO] java-1.9 0.0.1-SNAPSHOT ............................ SKIPPED
[INFO] python-3 0.0.1-SNAPSHOT ............................ SKIPPED
[INFO] scheme 0.0.1-SNAPSHOT .............................. SKIPPED
[INFO] text 0.0.1-SNAPSHOT ................................ SKIPPED
[INFO] utils 0.0.3-SNAPSHOT ............................... SKIPPED
[INFO] jplag 2.12.1-SNAPSHOT .............................. SKIPPED
[INFO] JPlag Aggregator 0.0.1-SNAPSHOT .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.584 s
[INFO] Finished at: 2019-06-09T08:45:45-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project frontend-utils: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: invalid target release: 11
[ERROR] Usage: javac
[ERROR] use --help for a list of possible options
[ERROR]
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :frontend-utils

Support for C++ raw string literals

I suffer from problems parsing students' ASCII art, usually correctly represented as a raw string (R"..."); jplag still parses and gets confused about internal escape sequences, characters prefixed by a backslash.
It would be so much easier if it didn't do that...

Parse error on UTF-8 source

Hi, I'm using the C++ frontend on the latest snapchot. I can see there is an issue about failing to parse chinese sources (#7) which I guess might be related? I'm not using any chinese characters, but the submissions I'm checking contains nordic letters such as Æ, Ø and Å.

Do you know if this is this an issue of the frontend, of is there is an issue with the Jplag engine?

Can't compile jplag

Hi,
I want to use Jplag for python files, and saw it exists at as a frontend.
I tried to compile it using maven but it's getting stuck.
Is there a new snapshot that python is already compiled into?

Base code exclusion does not appear to work

I'm running JPlag on a batch of submissions from our students. We gave them a base framework of Java code with some empty functions to fill in. I'm providing our base source code with -bc, but it still detects the base engine code as plagiarism between the files. The command line I used was:

java -jar jplag-2.11.9-SNAPSHOT-jar-with-dependencies.jar -S [some subpath] -s -bc ../template -l java17 -p java submissions/

"submissions" contained around 200 folders with a uniform format. The template was outside of the "submissions" hierarchy, because otherwise, it was plagiarism-checked, even though it was given as a base code directory.

I am currently unable to provide an example dataset here, as the grading is not yet complete and I can't publicly release the student's code. If you want me to send you one privately, please let me know who to send it to. The same is true if you need any additional information.

$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
$ uname -a
Linux Max-Work 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Problemas con la ejecución de jplag-2.11.8-SNAPSHOT-jar-with-dependencies.jar

hola buenas!

Tengo varios problemas con este programa ya que primero intente descargarme la version 2.11.9 pero resulta que solo encuentro el 2.11.8, porque hay una que pone 2.11.9 pero cuando la descargas resulta que es la 2.11.8 ( lo pongo aqui porque soy nueva en git hub y no se como comentar algo que haya subido otra persona).
Aparte de esto, al no poder acceder a la 2.11.9 he decidido usar la que tengo disponible que es la 2.11.8, pero no se como emplear el comando -bc. Yo lo que quiero hacer es con -bc poner un archivo base de codigo, y con este comparar todos los archivos que tenga guardados en otra carpeta.

¿Como podria hacer esto posible?

Muchas gracias.

can not find class 'TextLexer' and 'TextParser' in jplag.text.Parser

Thanks for your great project.
When I complied the source code from release jplag-2.11.9, Intellij show the error about can not find class 'TextLexer' and 'TextParser' in jplag.text.Parser.And there are no class files name 'TextLexer' and 'TextParser' in the package that I download from this repo.So,what should I do

Problems with running jplag-2.11.8-SNAPSHOT-jar-with-dependencies.jar

I downloaded this version of JPlag and tried to run it with the command:
java -jar jplag-2.11.8-SNAPSHOT-jar-with-dependencies.jar -l c -s mydir
and I got:
"Error: Illegal value: Language instantiation failed: Unknown language "c" ".
The same happened with "-l cpp". It seems to work only for the several versions of Java.

On the other hand, option "-p ?" produces:
"Error: No language found...".

I also tried to recompile JPlag by running: "mvn package" which produced a file: jplag-2.11.8-SNAPSHOT.jar. When I tried to execute it using the same command above, I got:

Exception in thread "main" java.lang.NoClassDefFoundError: jplag/Language
at jplag.JPlag.main(JPlag.java:12)
Caused by: java.lang.ClassNotFoundException: jplag.Language
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 1 more

All tests were executed under Ubuntu Linux, with Maven as follows:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T14:41:47-02:00)
Maven home: /home/tomasz/temp/apache-maven-3.3.9
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-77-generic", arch: "i386", family: "unix"

Any help will be appreciated. I am not very knowledgeable about Java and even less about Maven ;-(.

Not able to build JPlag with python 3.0

1)you can not build jplag using mvn clean generate-sources assembly:assembly,
as the repository POM file is pointing to (i.e. http://bob.ipd.uni-karlsruhe.de/nexus/content/repositories/public/ ) does not has pythom jar or pom files.

Specifically, this folder does not have python folder,
http://bob.ipd.uni-karlsruhe.de/nexus/content/repositories/public/edu/kit/ipd/jplag/
which breaks the building process, with the error:

[ERROR] Failed to execute goal on project jplag: Could not resolve dependencies for project edu.kit.ipd.jplag:jplag:jar:2.11.9-SNAPSHOT: Failure to find edu.kit.ipd.jplag:python-3:jar:0.0.1-SNAPSHOT in http://bob.ipd.uni-karlsruhe.de/nexus/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of ipdNexus has elapsed or updates are forced -> [Help 1]

  1. The second error is because of a wrong version, during the built, it points for maven pulgins at proguard-maven-plugin/2.10.11/ which shows 404 Not Found Error. But I think the version needed is proguard-maven-plugin/2.0.11/

I wanted to change the max output range from 1,000. But after doing so I am not able to build it again.
I changed the maven plugin link to the one I have mentioned above, and also commented Python dependency from main POM file then i was able to build successfully.

Please update the broken links and also add python in the repository.

Add documentation on how to select tokens

I'm trying to create a new frontend for JPLAG for Scala, however I'm having some trouble selecting the right set of tokens to use. It would be nice if there were some documentation on how to select an appropriate set of tokens. As too many would lead to false negatives, while too few would lead to false positives when matching. How was this done for the other parsers, simply a gut feeling or something more advanced.

Python3 front-end : 0 submission parsed successfully

Hello,

I am having issues using jplag with python3 front-end.

Indeed, i run jplag with the following command:

java -jar jplag.jar -r ~/result/ -l python3 -c solution.py solution.py

With solution.py:

#Exercice 1: Vitesse et amende
if ((vitesse_mesuree-5)-vitesse_autorisee>=20):
    amende=135
elif ((vitesse_mesuree-5)-vitesse_autorisee>=10) and ((vitesse_mesuree-5)-vitesse_autorisee<20):
    amende=90
elif ((vitesse_mesuree-5)-vitesse_autorisee<10) and ((vitesse_mesuree-5)-vitesse_autorisee>0):
    amende=68
else:
    amende=0`

But when I run the command I get the following output:

Language accepted: Python3 Parser
Command line: -r /home/ubuntu/result/ -l python3 -c solution.py solution.py 
initialize ok
0 submissions parsed successfully!
0 parser errors!
Error: Not enough valid submissions! (only 0 are valid):

Do you have any idea why parsing does not work ? Adding option -vd does not give any more information:

Language accepted: Python3 Parser
Command line: -vd -r /home/ubuntu/result/ -l python3 -c solution.py solution.py 
initialize ok
Files in submission 'solution.py':
  solution.py
Files in submission 'solution.py':
  solution.py
0 submissions parsed successfully!
0 parser errors!
Error: Not enough valid submissions! (only 0 are valid):

Best regards,

Florian Bolgar

I am not able to run JPlag

I want to run the version v2.11.9-SNAPSHOT..

I ran..
mvn clean generate-sources package in the base directory, followed by mvn clean generate-sources assembly:assembly inside the jplag directory.

Build was succesfull..
And The Jars were created in the respected target directories.

When I ran the Jar generated in the jplag/target, am getting the below error..

java -jar jplag-2.11.9-SNAPSHOT.jar

I got...

Exception in thread "main" java.lang.NoClassDefFoundError: jplag/ProgramI
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at jplag.options.Options.usage(Options.java:182)
at jplag.JPlag.main(JPlag.java:9)
Caused by: java.lang.ClassNotFoundException: jplag.ProgramI
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 14 more

When I specify the language, am getting the below error..

java -jar jplag-2.11.9-SNAPSHOT.jar -l java17

I got..

Exception in thread "main" java.lang.NoClassDefFoundError: jplag/Language
at jplag.JPlag.main(JPlag.java:12)
Caused by: java.lang.ClassNotFoundException: jplag.Language
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more

I am newbie in maven, help me run this!

if (!(ok = subm.parse()))

in jplag.Program line 921:
if (!(ok = subm.parse()))
errors++;
should it be:
if (!(ok == subm.parse()))
errors++;

I can’t create or run fresh JPlag version

Running partially fail

I want use latest version (master), but not release v2.11.8-SNAPSHOT because it have errors in C++ parser.

I cloned repository and run:

mvn clean generate-sources package

I ran it:

java -jar jplag/jplag/target/jplag-2.11.8-SNAPSHOT.jar -l c/c++ .

but got

Exception in thread "main" java.lang.NoClassDefFoundError: jplag/Language
        at jplag.JPlag.main(JPlag.java:12)
Caused by: java.lang.ClassNotFoundException: jplag.Language
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 1 more

Creating single file fail:

[~/work/Plagiarism/JPlag/jplag/jplag] branch:master$ mvn assembly:assembly
/usr/java/jdk1.8.0_92/bin/..
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jplag 2.11.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.4:assembly (default-cli) @ jplag >>>
Downloading: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/parent/0.3-SNAPSHOT/maven-metadata.xml
Downloaded: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/parent/0.3-SNAPSHOT/maven-metadata.xml (596 B at 2.0 KB/sec)
Downloading: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/parent/0.3-SNAPSHOT/parent-0.3-20150330.082632-3.pom
…
many other lines skipped
…
Downloading: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/maven-metadata.xml (770 B at 5.7 KB/sec)
Downloading: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/cpp-0.0.2-20150330.082634-1.pom
Downloaded: http://bob.ipd.kit.edu/nexus/content/repositories/public/edu/kit/ipd/jplag/cpp/0.0.2-SNAPSHOT/cpp-0.0.2-20150330.082634-1.pom (3 KB at 23.3 KB/sec)
…
many other lines skipped
…

It download to folder ~/.m2/repository/edu/kit/ipd/jplag/ old (for release v2.11.8-SNAPSHOT) files and creates JAR with buggy C++ parser.

I’m newbie in maven, help me run or create ‘master’ version!

How to build local server and handle with client?

I am wondering how to build a local web service.
When I was successfully run the command: mvn tomcat:run in jplag/jplag.webService , I found nothing but 404 in localhost:8080/JPlagService/service.And I don't know how to build a client that can connect with the local server.
Could you please tell us something wrong that I done?A detail procedure to build the server and client is much better if possible.

Thanks a lot for your attention.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.