Просмотр исходного кода

Merge branch 'master' into 192-webreport

Evgeni 5 лет назад
Родитель
Сommit
b20065b9e8
38 измененных файлов с 1249 добавлено и 1198 удалено
  1. 1 1
      .github/workflows/maven.yml
  2. 18 133
      README.md
  3. BIN
      UMLClassDiagram.png
  4. 11 9
      jplag.frontend-utils/pom.xml
  5. 34 33
      jplag.frontend.chars/pom.xml
  6. 104 103
      jplag.frontend.cpp/pom.xml
  7. 75 74
      jplag.frontend.csharp-1.2/pom.xml
  8. 105 104
      jplag.frontend.java-1.1exp/pom.xml
  9. 76 75
      jplag.frontend.java-1.2/pom.xml
  10. 72 71
      jplag.frontend.java-1.5/pom.xml
  11. 81 80
      jplag.frontend.java-1.7/pom.xml
  12. 34 33
      jplag.frontend.java-1.9/pom.xml
  13. 77 76
      jplag.frontend.python-3/pom.xml
  14. 114 113
      jplag.frontend.scheme/pom.xml
  15. 75 74
      jplag.frontend.text/pom.xml
  16. 49 67
      jplag.parent/pom.xml
  17. 20 11
      jplag/pom.xml
  18. 3 3
      jplag/src/main/java/de/jplag/CLI.java
  19. 38 25
      jplag/src/main/java/de/jplag/CommandLineArgument.java
  20. 25 26
      jplag/src/main/java/de/jplag/JPlag.java
  21. 9 18
      jplag/src/main/java/de/jplag/JPlagResult.java
  22. 21 0
      jplag/src/main/java/de/jplag/Messages.java
  23. 20 15
      jplag/src/main/java/de/jplag/options/JPlagOptions.java
  24. 13 10
      jplag/src/main/java/de/jplag/reporting/Report.java
  25. 2 2
      jplag/src/main/java/de/jplag/strategy/AbstractComparisonStrategy.java
  26. 2 2
      jplag/src/main/java/de/jplag/strategy/ComparisonStrategy.java
  27. 1 1
      jplag/src/main/java/de/jplag/strategy/NormalComparisonStrategy.java
  28. 3 3
      jplag/src/main/java/de/jplag/strategy/ParallelComparisonStrategy.java
  29. 13 0
      jplag/src/main/resources/de/jplag/messages.properties
  30. 45 0
      jplag/src/test/java/de/jplag/BaseCodeTest.java
  31. 5 5
      jplag/src/test/java/de/jplag/NormalComparisonTest.java
  32. 15 15
      jplag/src/test/java/de/jplag/ParallelComparisonTest.java
  33. 7 4
      jplag/src/test/java/de/jplag/TestBase.java
  34. 4 4
      jplag/src/test/java/de/jplag/VolumeTest.java
  35. 8 8
      jplag/src/test/java/de/jplag/cli/StoredMatchesTest.java
  36. 27 0
      jplag/src/test/resources/de/jplag/samples/basecode/A/TerrainType.java
  37. 30 0
      jplag/src/test/resources/de/jplag/samples/basecode/B/TerrainType.java
  38. 12 0
      jplag/src/test/resources/de/jplag/samples/basecode/base/TerrainType.java

+ 1 - 1
.github/workflows/maven.yml

@@ -13,7 +13,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v2.3.4
+    - uses: actions/checkout@v2.4.0
 
     - name: Set up JDK
       uses: actions/setup-java@v2

+ 18 - 133
README.md

@@ -1,5 +1,5 @@
 <p align="center"> 
-	<img alt="JPlag logo" src="jplag/src/main/resources/de/jplag/reporting/data/logo-dark.png">
+	<img alt="JPlag logo" src="jplag/src/main/resources/de/jplag/reporting/data/logo-dark.png" width="350">
 </p>
 
 # JPlag - Detecting Software Plagiarism
@@ -11,32 +11,18 @@
 ## Download and Installation
 
 ### Downloading a release
-Download a [released version](https://github.com/jplag/jplag/releases), the most recent is [v3.0.0](https://github.com/jplag/jplag/releases/tag/v3.0.0-SNAPSHOT).
-All releases are single-JAR releases.
+* Download a [released version](https://github.com/jplag/jplag/releases).
+* In case you depend on the legacy version of JPlag we refer to the [legacy release v2.12.1](https://github.com/jplag/jplag/releases/tag/v2.12.1-SNAPSHOT) and the [legacy branch](https://github.com/jplag/jplag/tree/legacy).
 
 ### 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 assembly:single`. 
+3. Inside the `jplag` directory run `mvn clean generate-sources package`. 
 
 You will find the generated JAR with all dependencies in  `jplag/target`.
 
-## JPlag legacy version
-In case you depend on the legacy version of JPlag we refer to the [legacy release v2.12.1](https://github.com/jplag/jplag/releases/tag/v2.12.1-SNAPSHOT) and the [legacy branch](https://github.com/jplag/jplag/tree/legacy).
-
-The following features are only available in version v3.0.0 and onwards:
-* a Java API for third-party integration
-* a simplified command-line interface
-* support for Java files containing new language features
-* improved colors for source codes matches in the report
-* a parallel comparison mode
-
-The following features are currently only supported in the legacy version:
-* result clustering
-* comparison based on maximum similarity
-
 ## Usage
-JPlag can either be used via the CLI or directly via its Java API.
+JPlag can either be used via the CLI or directly via its Java API. For more information, see the [usage information in the wiki](https://github.com/jplag/JPlag/wiki/1.-How-to-Use-JPlag).
 
 ### CLI
 *Note that the [legacy CLI](https://github.com/jplag/jplag/blob/legacy/README.md) is varying slightly.*
@@ -50,24 +36,22 @@ Usage: JPlag [ options ] [<root-dir>]
 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)
+  -bc BC                 Name of the subdirectory of the root 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)
+  -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)
+  -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
+  -m M                   Match similarity threshold [0-100]: All matches above this threshold will be saved (Standard: 0.0)
+  -n N                   The maximum number of comparisons that will be shown in the generated report, if set to -1 all comparisons will be shown (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)
+  -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.
-
-#### Example 
+The new API makes it easy to integrate JPlag's plagiarism detection into external Java projects:
 
 ```java
 JPlagOptions options = new JPlagOptions("/path/to/rootDir", LanguageOption.JAVA_1_9);
@@ -85,112 +69,13 @@ Report report = new Report(outputDir);
 report.writeResult(result);
 ```
 
-#### Class Diagram
-<p align="center">
-	<img alt="UMLClassDiagram.png" src="UMLClassDiagram.png?raw=true" width="800">
-</p>
-
-## Concepts
-
-This section explains some fundamental concepts about JPlag that make it easier to understand and use.
-
-### Root directory
-
-This is the directory in which JPlag will scan for submissions.
-
-### Submissions
-
-Submissions contain the source code that JPlag will parse and compare. They have to be direct children of the root directory and can either be single files or directories.
-
-#### Example: Single-file submissions
-
-```
-/path/to/root-directory
-├── Submission-1.java
-├── ...
-└── Submission-n.java
-```
-
-#### Example: Directory submissions
-
-JPlag will read submission directories recursively, so they can contain multiple (nested) source code files.
-
-```
-/path/to/root-directory
-├── Submission-1
-│   ├── Main.java
-│   └── util
-│       └── Utils.java
-├── ...
-└── Submission-n
-    ├── Main.java
-    └── util
-        └── Utils.java
-```
-
-If you want JPlag to scan only one specific subdirectory of a submission for source code files (e.g. `src`), you can pass the `-S` option:
-
-```
-With option --subDir=src
-
-/path/to/root-directory
-├── Submission-1
-│   ├── src                 
-│   │   ├── Main.java       # Included
-│   │   └── util            
-│   │       └── Utils.java  # Included
-│   ├── lib                 
-│   │   └── Library.java    # Ignored
-│   └── Other.java          # Ignored
-└── ...
-```
-
-### Base Code
-
-The base code is a special kind of submission. It is the template that all other submissions are based on. JPlag will ignore any match between two submissions that is also part of the base code.
-
-Like any other submission, the base code has to be a single file or directory in the root directory.
-
-```
-/path/to/root-directory
-├── BaseCode
-│   └── Solution.java
-├── Submission-1
-│   └── Solution.java
-├── ...
-└── Submission-n
-    └── Solution.java
-```
-
-#### Example
-
-In this example, students have to solve a given problem by implementing the `run` method in the template below. Because they are not supposed to modify the `main` function, it will be identical for each student. 
-
-```java
-// BaseCode/Solution.java
-public class Solution {
-
-    // DO NOT MODIFY
-    public static void main(String[] args) {
-        Solution solution = new Solution();  
-        solution.run();
-    }
-    
-    public void run() {
-        // TODO: Implement your solution here.
-    }
-}
-```
-
-To prevent JPlag from detecting similarities in the `main` function (and other parts of the template), we can instruct JPlag to ignore matches with the given base code by providing the `--baseCode=<base-code-name>` option. 
-
-The `<base-code-name>` in the example above is `BaseCode`.
-
 ## 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](https://github.com/jplag/JPlag/wiki/2.-Contributing-to-JPlag).
 
-### Adding new languages
-Adding a new language frontend is quite simple. Have a look at one of the `jplag.frontend` projects. All you need is a parser for the language (e.g., for ANTLR or for JavaCC) and a few lines of code that send the tokens (that are generated by the parser) to JPlag.
+## Contact
+If you encounter bugs or other issues, please report them [here](https://github.com/jplag/jplag/issues).
+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!
 
-## Research
-If you are doing research related to JPlag, we would love to know what you are doing. Feel free to contact us at jplag@ipd.kit.edu or here on GitHub.
+### More information can be found in our [Wiki](https://github.com/jplag/JPlag/wiki)!

BIN
UMLClassDiagram.png


+ 11 - 9
jplag.frontend-utils/pom.xml

@@ -1,18 +1,20 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>frontend-utils</artifactId>
   <version>0.0.3-SNAPSHOT</version>
   <parent>
-  	<groupId>de.jplag</groupId>
-  	<artifactId>parent</artifactId>
-  	<version>0.3-SNAPSHOT</version>
-  	<relativePath>../jplag.parent/pom.xml</relativePath>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
   </parent>
 
   <dependencies>
-  	<dependency>
-  		<groupId>antlr</groupId>
-  		<artifactId>antlr</artifactId>
-  	</dependency>
+    <dependency>
+      <groupId>antlr</groupId>
+      <artifactId>antlr</artifactId>
+    </dependency>
   </dependencies>
 </project>

+ 34 - 33
jplag.frontend.chars/pom.xml

@@ -1,36 +1,37 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.chars.Parser</mainClass>
-							<packageName>jplag.chars</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.chars.Parser</mainClass>
+              <packageName>jplag.chars</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
-	<artifactId>chars</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
+  <artifactId>chars</artifactId>
 </project>

+ 104 - 103
jplag.frontend.cpp/pom.xml

@@ -1,107 +1,108 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>cpp</artifactId>
-	<version>0.0.2-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>cpp</artifactId>
+  <version>0.0.2-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/javacc</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>add-javacc-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/javacc</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>add-javacc-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
 
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>javacc-maven-plugin</artifactId>
-				<version>2.6</version>
-				<configuration>
-					<configuration>
-						<debugparser>false</debugparser>
-						<isStatic>false</isStatic>  
-						<grammarEncoding>${project.build.sourceEncoding}</grammarEncoding>
-					</configuration>
-				</configuration>
-				<executions>
-					<execution>
-						<id>javacc</id>
-						<goals>
-							<goal>javacc</goal>
-						</goals>
-					</execution>
-				</executions>
-				<dependencies>
-					<dependency>
-						<groupId>net.java.dev.javacc</groupId>
-						<artifactId>javacc</artifactId>
-						<version>7.0.10</version>
-					</dependency>
-				</dependencies>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<!--This plugin's configuration is used to store Eclipse m2e settings 
-					only. It has no influence on the Maven build itself. -->
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											org.codehaus.mojo
-										</groupId>
-										<artifactId>
-											javacc-maven-plugin
-										</artifactId>
-										<versionRange>
-											[2.6]
-										</versionRange>
-										<goals>
-											<goal>javacc</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>javacc-maven-plugin</artifactId>
+        <version>2.6</version>
+        <configuration>
+          <configuration>
+            <debugparser>false</debugparser>
+            <isStatic>false</isStatic>
+            <grammarEncoding>${project.build.sourceEncoding}</grammarEncoding>
+          </configuration>
+        </configuration>
+        <executions>
+          <execution>
+            <id>javacc</id>
+            <goals>
+              <goal>javacc</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>net.java.dev.javacc</groupId>
+            <artifactId>javacc</artifactId>
+            <version>7.0.10</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <!--This plugin's configuration is used to store Eclipse m2e settings 
+          only. It has no influence on the Maven build itself. -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>
+                      org.codehaus.mojo
+                    </groupId>
+                    <artifactId>
+                      javacc-maven-plugin
+                    </artifactId>
+                    <versionRange>
+                      [2.6]
+                    </versionRange>
+                    <goals>
+                      <goal>javacc</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 75 - 74
jplag.frontend.csharp-1.2/pom.xml

@@ -1,79 +1,80 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>csharp-1.2</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>csharp-1.2</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<executions>
-					<execution>
-						<id>add-antlr-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
-						<configuration>
-							<sources>
-								<source>target/generated-sources/antlr</source>
-							</sources>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>antlr-maven-plugin</artifactId>
-				<version>2.1</version>
-				<configuration>
-					<!-- Comma separated list of grammar files or pattern grammar files 
-						By default, grammar file(s) is in ${basedir}/src/main/antlr -->
-					<grammars>csharp.g</grammars>
-					<!-- <grammars>*.g</grammars> -->
-				</configuration>
-				<executions>
-					<execution>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <executions>
+          <execution>
+            <id>add-antlr-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>target/generated-sources/antlr</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>antlr-maven-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <!-- Comma separated list of grammar files or pattern grammar files 
+            By default, grammar file(s) is in ${basedir}/src/main/antlr -->
+          <grammars>csharp.g</grammars>
+          <!-- <grammars>*.g</grammars> -->
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.csharp.Parser</mainClass>
-							<packageName>jplag.csharp</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.csharp.Parser</mainClass>
+              <packageName>jplag.csharp</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
 
-		</plugins>
-	</build>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>antlr</groupId>
-			<artifactId>antlr</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>antlr</groupId>
+      <artifactId>antlr</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 105 - 104
jplag.frontend.java-1.1exp/pom.xml

@@ -1,109 +1,110 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>java-1.1exp</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>java-1.1exp</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/javacc</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>add-javacc-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/javacc</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>add-javacc-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
 
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>javacc-maven-plugin</artifactId>
-				<version>2.6</version>
-				<configuration>
-					<isStatic>false</isStatic>
-				</configuration>
-				<executions>
-					<execution>
-						<id>javacc</id>
-						<goals>
-							<goal>javacc</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>javacc-maven-plugin</artifactId>
+        <version>2.6</version>
+        <configuration>
+          <isStatic>false</isStatic>
+        </configuration>
+        <executions>
+          <execution>
+            <id>javacc</id>
+            <goals>
+              <goal>javacc</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.javax.Parser</mainClass>
-							<packageName>jplag.javax</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<!--This plugin's configuration is used to store Eclipse m2e settings
-					only. It has no influence on the Maven build itself. -->
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											org.codehaus.mojo
-										</groupId>
-										<artifactId>
-											javacc-maven-plugin
-										</artifactId>
-										<versionRange>
-											[2.6,)
-										</versionRange>
-										<goals>
-											<goal>javacc</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.javax.Parser</mainClass>
+              <packageName>jplag.javax</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <!--This plugin's configuration is used to store Eclipse m2e settings 
+          only. It has no influence on the Maven build itself. -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>
+                      org.codehaus.mojo
+                    </groupId>
+                    <artifactId>
+                      javacc-maven-plugin
+                    </artifactId>
+                    <versionRange>
+                      [2.6,)
+                    </versionRange>
+                    <goals>
+                      <goal>javacc</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 76 - 75
jplag.frontend.java-1.2/pom.xml

@@ -1,81 +1,82 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>java-1.2</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>java-1.2</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>src/main/antlr</source>
-						<source>target/generated-sources/antlr</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>add-antlr-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>src/main/antlr</source>
+            <source>target/generated-sources/antlr</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>add-antlr-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
 
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>antlr-maven-plugin</artifactId>
-				<version>2.2</version>
-				<configuration>
-					<!-- Comma separated list of grammar files or pattern grammar files 
-						By default, grammar file(s) is in ${basedir}/src/main/antlr -->
-					<grammars>java.g</grammars>
-					<!-- <grammars>*.g</grammars> -->
-				</configuration>
-				<executions>
-					<execution>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>antlr-maven-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <!-- Comma separated list of grammar files or pattern grammar files 
+            By default, grammar file(s) is in ${basedir}/src/main/antlr -->
+          <grammars>java.g</grammars>
+          <!-- <grammars>*.g</grammars> -->
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.java.Parser</mainClass>
-							<packageName>jplag.java</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.java.Parser</mainClass>
+              <packageName>jplag.java</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
 
-		</plugins>
-	</build>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>antlr</groupId>
-			<artifactId>antlr</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>antlr</groupId>
+      <artifactId>antlr</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 72 - 71
jplag.frontend.java-1.5/pom.xml

@@ -1,76 +1,77 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/javacc</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>add-javacc-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/javacc</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>add-javacc-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
 
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>javacc-maven-plugin</artifactId>
-				<version>2.0</version>
-				<configuration>
-					<grammarEncoding>${project.build.sourceEncoding}</grammarEncoding>
-					<debugparser>false</debugparser>
-					<isStatic>false</isStatic>
-					<outputDirectory>${project.basedir}/src/main/java/de/jplag/java15/grammar</outputDirectory>
-				</configuration>
-				<executions>
-					<execution>
-						<id>javacc</id>
-						<goals>
-							<goal>javacc</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>javacc-maven-plugin</artifactId>
+        <version>2.0</version>
+        <configuration>
+          <grammarEncoding>${project.build.sourceEncoding}</grammarEncoding>
+          <debugparser>false</debugparser>
+          <isStatic>false</isStatic>
+          <outputDirectory>${project.basedir}/src/main/java/de/jplag/java15/grammar</outputDirectory>
+        </configuration>
+        <executions>
+          <execution>
+            <id>javacc</id>
+            <goals>
+              <goal>javacc</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.java15.Parser</mainClass>
-							<packageName>jplag.java15</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.java15.Parser</mainClass>
+              <packageName>jplag.java15</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
-	<artifactId>java-1.5</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
+  <artifactId>java-1.5</artifactId>
 </project>

+ 81 - 80
jplag.frontend.java-1.7/pom.xml

@@ -1,86 +1,87 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>java-1.7</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>java-1.7</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/antlr4</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>generate-antlr-sources</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
-					</execution>
-					<execution>
-						<id>compile-with-antlr-sources</id>
-						<phase>compile</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/antlr4</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>generate-antlr-sources</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>compile-with-antlr-sources</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.antlr</groupId>
-				<artifactId>antlr4-maven-plugin</artifactId>
-				<version>4.2</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>antlr4</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+      <plugin>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr4-maven-plugin</artifactId>
+        <version>4.9.3</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>antlr4</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.java17.Parser</mainClass>
-							<packageName>jplag.java17</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.java17.Parser</mainClass>
+              <packageName>jplag.java17</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
 
-		</plugins>
-	</build>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.antlr</groupId>
-			<artifactId>antlr4-runtime</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>java-1.5</artifactId>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.antlr</groupId>
+      <artifactId>antlr4-runtime</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>java-1.5</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 34 - 33
jplag.frontend.java-1.9/pom.xml

@@ -1,38 +1,39 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>java-1.9</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>java-1.9</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
+  <build>
+    <plugins>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.java19.Parser</mainClass>
-							<packageName>jplag.java19</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.java19.Parser</mainClass>
+              <packageName>jplag.java19</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
 
-		</plugins>
-	</build>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 77 - 76
jplag.frontend.python-3/pom.xml

@@ -1,80 +1,81 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>python-3</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/antlr4</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>generate-antlr-sources</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
-					</execution>
-					<execution>
-						<id>compile-with-antlr-sources</id>
-						<phase>compile</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.antlr</groupId>
-				<artifactId>antlr4-maven-plugin</artifactId>
-				<version>4.2</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>antlr4</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>python-3</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.python3.Parser</mainClass>
-							<packageName>jplag.python3</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/antlr4</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>generate-antlr-sources</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>compile-with-antlr-sources</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr4-maven-plugin</artifactId>
+        <version>4.9.3</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>antlr4</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-		</plugins>
-	</build>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.python3.Parser</mainClass>
+              <packageName>jplag.python3</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.antlr</groupId>
-			<artifactId>antlr4-runtime</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.antlr</groupId>
+      <artifactId>antlr4-runtime</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 114 - 113
jplag.frontend.scheme/pom.xml

@@ -1,120 +1,121 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>scheme</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>scheme</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/javacc</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>add-javacc-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/javacc</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>add-javacc-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
 
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>javacc-maven-plugin</artifactId>
-				<version>2.6</version>
-				<configuration>
-					<grammarEncoding>${project.build.sourceEncoding}</grammarEncoding>
-					<isStatic>false</isStatic>
-					<debugparser>false</debugparser>
-				</configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>javacc-maven-plugin</artifactId>
+        <version>2.6</version>
+        <configuration>
+          <grammarEncoding>${project.build.sourceEncoding}</grammarEncoding>
+          <isStatic>false</isStatic>
+          <debugparser>false</debugparser>
+        </configuration>
 
-				<executions>
-					<execution>
-						<id>javacc</id>
-						<goals>
-							<goal>javacc</goal>
-						</goals>
-					</execution>
-				</executions>
+        <executions>
+          <execution>
+            <id>javacc</id>
+            <goals>
+              <goal>javacc</goal>
+            </goals>
+          </execution>
+        </executions>
 
-				<dependencies>
-					<dependency>
-						<groupId>net.java.dev.javacc</groupId>
-						<artifactId>javacc</artifactId>
-						<version>7.0.10</version>
-					</dependency>
-				</dependencies>
-			</plugin>
+        <dependencies>
+          <dependency>
+            <groupId>net.java.dev.javacc</groupId>
+            <artifactId>javacc</artifactId>
+            <version>7.0.10</version>
+          </dependency>
+        </dependencies>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.scheme.Parser</mainClass>
-							<packageName>jplag.scheme</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<!--This plugin's configuration is used to store Eclipse m2e settings 
-					only. It has no influence on the Maven build itself. -->
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											org.codehaus.mojo
-										</groupId>
-										<artifactId>
-											javacc-maven-plugin
-										</artifactId>
-										<versionRange>
-											[2.6]
-										</versionRange>
-										<goals>
-											<goal>javacc</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.scheme.Parser</mainClass>
+              <packageName>jplag.scheme</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <!--This plugin's configuration is used to store Eclipse m2e settings 
+          only. It has no influence on the Maven build itself. -->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>
+                      org.codehaus.mojo
+                    </groupId>
+                    <artifactId>
+                      javacc-maven-plugin
+                    </artifactId>
+                    <versionRange>
+                      [2.6]
+                    </versionRange>
+                    <goals>
+                      <goal>javacc</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 75 - 74
jplag.frontend.text/pom.xml

@@ -1,80 +1,81 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<artifactId>text</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>text</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>build-helper-maven-plugin</artifactId>
-				<version>3.2.0</version>
-				<configuration>
-					<sources>
-						<source>target/generated-sources/antlr</source>
-					</sources>
-				</configuration>
-				<executions>
-					<execution>
-						<id>add-antlr-source</id>
-						<phase>generate-sources</phase>
-						<goals>
-							<goal>add-source</goal>
-						</goals>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.2.0</version>
+        <configuration>
+          <sources>
+            <source>target/generated-sources/antlr</source>
+          </sources>
+        </configuration>
+        <executions>
+          <execution>
+            <id>add-antlr-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
 
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>antlr-maven-plugin</artifactId>
-				<version>2.2</version>
-				<configuration>
-					<!-- Comma separated list of grammar files or pattern grammar files
-						By default, grammar file(s) is in ${basedir}/src/main/antlr -->
-					<!-- <grammars>*.g</grammars> -->
-					<grammars>text.g</grammars>
-				</configuration>
-				<executions>
-					<execution>
-						<goals>
-							<goal>generate</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>antlr-maven-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <!-- Comma separated list of grammar files or pattern grammar files 
+            By default, grammar file(s) is in ${basedir}/src/main/antlr -->
+          <!-- <grammars>*.g</grammars> -->
+          <grammars>text.g</grammars>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
 
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-					<archive>
-						<manifest>
-							<mainClass>de.jplag.text.Parser</mainClass>
-							<packageName>jplag.text</packageName>
-						</manifest>
-					</archive>
-				</configuration>
-			</plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <mainClass>de.jplag.text.Parser</mainClass>
+              <packageName>jplag.text</packageName>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
 
-		</plugins>
-	</build>
+    </plugins>
+  </build>
 
-	<dependencies>
-		<dependency>
-			<groupId>antlr</groupId>
-			<artifactId>antlr</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>de.jplag</groupId>
-			<artifactId>frontend-utils</artifactId>
-		</dependency>
-	</dependencies>
-	<parent>
-		<groupId>de.jplag</groupId>
-		<artifactId>parent</artifactId>
-		<version>0.3-SNAPSHOT</version>
-		<relativePath>../jplag.parent/pom.xml</relativePath>
-	</parent>
+  <dependencies>
+    <dependency>
+      <groupId>antlr</groupId>
+      <artifactId>antlr</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>de.jplag</groupId>
+      <artifactId>frontend-utils</artifactId>
+    </dependency>
+  </dependencies>
+  <parent>
+    <groupId>de.jplag</groupId>
+    <artifactId>parent</artifactId>
+    <version>0.3-SNAPSHOT</version>
+    <relativePath>../jplag.parent/pom.xml</relativePath>
+  </parent>
 </project>

+ 49 - 67
jplag.parent/pom.xml

@@ -43,24 +43,6 @@
       <organizationUrl>https://sdq.ipd.kit.edu/</organizationUrl>
       <timezone>GMT+1</timezone>
     </developer>
-    <developer>
-      <id>sw</id>
-      <name>Sebastian Weigelt</name>
-      <email>weigelt@kit.edu</email>
-      <url>https://ps.ipd.kit.edu/176_347.php</url>
-      <organization>IPD Tichy</organization>
-      <organizationUrl>https://ps.ipd.kit.edu/</organizationUrl>
-      <timezone>GMT+1</timezone>
-    </developer>
-    <developer>
-      <id>lama</id>
-      <name>Mathias Landhäußer</name>
-      <email>mathias.landhaeusser@kit.edu</email>
-      <url>https://ps.ipd.kit.edu/176_366.php</url>
-      <organization>IPD Tichy</organization>
-      <organizationUrl>https://ps.ipd.kit.edu/</organizationUrl>
-      <timezone>GMT+1</timezone>
-    </developer>
   </developers>
 
   <properties>
@@ -116,7 +98,7 @@
     </plugins>
     <pluginManagement>
       <plugins>
-        <!--This plugin's configuration is used to store Eclipse m2e settings
+        <!--This plugin's configuration is used to store Eclipse m2e settings 
           only. It has no influence on the Maven build itself. -->
         <plugin>
           <groupId>org.eclipse.m2e</groupId>
@@ -219,52 +201,52 @@
         <artifactId>chars</artifactId>
         <version>0.0.1-SNAPSHOT</version>
       </dependency>
-			<dependency>
-				<groupId>junit</groupId>
-				<artifactId>junit</artifactId>
-				<version>4.13.2</version>
-			</dependency>
-			<dependency>
-				<groupId>antlr</groupId>
-				<artifactId>antlr</artifactId>
-				<version>2.7.7</version>
-			</dependency>
-			<dependency>
-				<groupId>org.antlr</groupId>
-				<artifactId>antlr4-runtime</artifactId>
-				<version>4.9.2</version>
-			</dependency>
-			<dependency>
-				<groupId>org.antlr</groupId>
-				<artifactId>antlr4</artifactId>
-				<version>4.9.2</version>
-			</dependency>
-			<dependency>
-				<groupId>org.antlr</groupId>
-				<artifactId>antlr3</artifactId>
-				<version>3.5</version>
-			</dependency>
-			<dependency>
-				<groupId>org.antlr</groupId>
-				<artifactId>antlr3-runtime</artifactId>
-				<version>3.5</version>
-			</dependency>
-			<dependency>
-				<groupId>de.jplag</groupId>
-				<artifactId>frontend-utils</artifactId>
-				<version>0.0.3-SNAPSHOT</version>
-			</dependency>
-			<dependency>
-				<groupId>de.jplag</groupId>
-				<artifactId>jplag</artifactId>
-				<version>3.0.0-SNAPSHOT</version>
-			</dependency>
-			<dependency>
-				<groupId>de.jplag</groupId>
-				<artifactId>java-1.5</artifactId>
-				<version>0.0.1-SNAPSHOT</version>
-			</dependency>
-		</dependencies>
-	</dependencyManagement>
-	<name>JPlag Plagiarism Detector</name>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>4.13.2</version>
+      </dependency>
+      <dependency>
+        <groupId>antlr</groupId>
+        <artifactId>antlr</artifactId>
+        <version>2.7.7</version>
+      </dependency>
+      <dependency>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr4-runtime</artifactId>
+        <version>4.9.3</version>
+      </dependency>
+      <dependency>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr4</artifactId>
+        <version>4.9.3</version>
+      </dependency>
+      <dependency>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr3</artifactId>
+        <version>3.5</version>
+      </dependency>
+      <dependency>
+        <groupId>org.antlr</groupId>
+        <artifactId>antlr3-runtime</artifactId>
+        <version>3.5</version>
+      </dependency>
+      <dependency>
+        <groupId>de.jplag</groupId>
+        <artifactId>frontend-utils</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>de.jplag</groupId>
+        <artifactId>jplag</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>de.jplag</groupId>
+        <artifactId>java-1.5</artifactId>
+        <version>0.0.1-SNAPSHOT</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <name>JPlag Plagiarism Detector</name>
 </project>

+ 20 - 11
jplag/pom.xml

@@ -54,14 +54,14 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>javacc-maven-plugin</artifactId>
-        <!-- If you need javacc version 3.2 (as did the original jplag) use plugin
-            version 2.0; plugin version 2.6 uses javacc version 5.0 -->
+        <!-- If you need javacc version 3.2 (as did the original jplag) use 
+          plugin version 2.0; plugin version 2.6 uses javacc version 5.0 -->
         <version>2.6</version>
         <configuration>
           <debugParser>false</debugParser>
           <isStatic>false</isStatic>
-          <!-- we need this since the old plugin does not read the package from
-              the grammar; as of 2.4 the plugin does that on its own <packageName>jplag.filter</packageName> -->
+          <!-- we need this since the old plugin does not read the package 
+            from the grammar; as of 2.4 the plugin does that on its own <packageName>jplag.filter</packageName> -->
         </configuration>
         <executions>
           <execution>
@@ -100,13 +100,22 @@
             </manifest>
           </archive>
         </configuration>
+        <executions>
+          <execution>
+            <id>make-assembly</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
 
     <pluginManagement>
       <plugins>
-        <!--This plugin's configuration is used to store Eclipse m2e settings
-            only. It has no influence on the Maven build itself. -->
+        <!--This plugin's configuration is used to store Eclipse m2e settings 
+          only. It has no influence on the Maven build itself. -->
         <plugin>
           <groupId>org.eclipse.m2e</groupId>
           <artifactId>lifecycle-mapping</artifactId>
@@ -130,7 +139,7 @@
                     </goals>
                   </pluginExecutionFilter>
                   <action>
-                    <ignore/>
+                    <ignore />
                   </action>
                 </pluginExecution>
               </pluginExecutions>
@@ -203,10 +212,10 @@
       <artifactId>chars</artifactId>
     </dependency>
     <dependency>
-    	<groupId>com.github.stefanbirkner</groupId>
-    	<artifactId>system-rules</artifactId>
-    	<scope>test</scope>
-    	<version>1.19.0</version>
+      <groupId>com.github.stefanbirkner</groupId>
+      <artifactId>system-rules</artifactId>
+      <scope>test</scope>
+      <version>1.19.0</version>
     </dependency>
   </dependencies>
 </project>

+ 3 - 3
jplag/src/main/java/de/jplag/CLI.java

@@ -9,7 +9,7 @@ import static de.jplag.CommandLineArgument.MIN_TOKEN_MATCH;
 import static de.jplag.CommandLineArgument.RESULT_FOLDER;
 import static de.jplag.CommandLineArgument.ROOT_DIRECTORY;
 import static de.jplag.CommandLineArgument.SIMILARITY_THRESHOLD;
-import static de.jplag.CommandLineArgument.STORED_MATCHES;
+import static de.jplag.CommandLineArgument.SHOWN_COMPARISONS;
 import static de.jplag.CommandLineArgument.SUBDIRECTORY;
 import static de.jplag.CommandLineArgument.SUFFIXES;
 import static de.jplag.CommandLineArgument.VERBOSITY;
@@ -56,7 +56,7 @@ public class CLI {
             System.out.println("JPlag initialized");
             JPlagResult result = program.run();
             File reportDir = new File(arguments.getString(RESULT_FOLDER.flagWithoutDash()));
-            Report report = new Report(reportDir);
+            Report report = new Report(reportDir, options);
             report.writeResult(result);
         } catch (ExitException exception) {
             System.out.println("Error: " + exception.getReport());
@@ -110,7 +110,7 @@ public class CLI {
         options.setExclusionFileName(EXCLUDE_FILE.getFrom(namespace));
         options.setMinimumTokenMatch(MIN_TOKEN_MATCH.getFrom(namespace));
         options.setSimilarityThreshold(SIMILARITY_THRESHOLD.getFrom(namespace));
-        options.setMaximumNumberOfMatches(STORED_MATCHES.getFrom(namespace));
+        options.setMaximumNumberOfComparisons(SHOWN_COMPARISONS.getFrom(namespace));
         ComparisonMode.fromName(COMPARISON_MODE.getFrom(namespace)).ifPresentOrElse(it -> options.setComparisonMode(it),
                 () -> System.out.println("Unknown comparison mode, using default mode!"));
         return options;

+ 38 - 25
jplag/src/main/java/de/jplag/CommandLineArgument.java

@@ -1,8 +1,8 @@
 package de.jplag;
 
 import static de.jplag.options.JPlagOptions.DEFAULT_COMPARISON_MODE;
+import static de.jplag.options.JPlagOptions.DEFAULT_SHOWN_COMPARISONS;
 import static de.jplag.options.JPlagOptions.DEFAULT_SIMILARITY_THRESHOLD;
-import static de.jplag.options.JPlagOptions.DEFAULT_STORED_MATCHES;
 import static net.sourceforge.argparse4j.impl.Arguments.storeTrue;
 
 import java.util.Collection;
@@ -20,46 +20,46 @@ import net.sourceforge.argparse4j.inf.Namespace;
  * @author Timur Saglam
  */
 public enum CommandLineArgument {
-    ROOT_DIRECTORY("rootDir", String.class, "The root-directory that contains all submissions"),
-    LANGUAGE("-l", String.class, "Select the language to parse the submissions", LanguageOption.getDefault().getDisplayName(), LanguageOption.getAllDisplayNames()),
-    BASE_CODE("-bc", String.class, "Name of the directory which contains the base code (common framework used in all submissions)"),
-    VERBOSITY("-v", String.class, "Verbosity", "quiet", List.of("parser", "quiet", "long", "details")), // TODO SH: Replace verbosity when integrating a real logging library
-    DEBUG("-d", Boolean.class, "(Debug) parser. Non-parsable files will be stored"),
-    SUBDIRECTORY("-S", String.class, "Look in directories <root-dir>/*/<dir> for programs"),
-    SUFFIXES("-p", String.class, "comma-separated list of all filename suffixes that are included"),
-    EXCLUDE_FILE("-x", String.class, "All files named in this file will be ignored in the comparison (line-separated list)"),
-    MIN_TOKEN_MATCH("-t", Integer.class, "Tune the sensitivity of the comparison. A smaller <n> increases the sensitivity"),
-    SIMILARITY_THRESHOLD("-m", Float.class, "Match similarity threshold [0-100]: All matches above this threshold will be saved", DEFAULT_SIMILARITY_THRESHOLD),
-    STORED_MATCHES("-n", Integer.class, "Maximum number of matches that will be saved. If set to -1 all matches will be saved", DEFAULT_STORED_MATCHES),
-    RESULT_FOLDER("-r", String.class, "Name of directory in which the comparison results will be stored", "result"),
-    COMPARISON_MODE("-c", String.class, "Comparison mode used to compare the programs", DEFAULT_COMPARISON_MODE.getName(), ComparisonMode.allNames());
+    ROOT_DIRECTORY("rootDir", String.class),
+    LANGUAGE("-l", String.class, LanguageOption.getDefault().getDisplayName(), LanguageOption.getAllDisplayNames()),
+    BASE_CODE("-bc", String.class),
+    VERBOSITY("-v", String.class, "quiet", List.of("parser", "quiet", "long", "details")), // TODO SH: Replace verbosity when integrating a real logging library
+    DEBUG("-d", Boolean.class),
+    SUBDIRECTORY("-S", String.class),
+    SUFFIXES("-p", String.class),
+    EXCLUDE_FILE("-x", String.class),
+    MIN_TOKEN_MATCH("-t", Integer.class),
+    SIMILARITY_THRESHOLD("-m", Float.class, DEFAULT_SIMILARITY_THRESHOLD),
+    SHOWN_COMPARISONS("-n", Integer.class, DEFAULT_SHOWN_COMPARISONS),
+    RESULT_FOLDER("-r", String.class, "result"),
+    COMPARISON_MODE("-c", String.class, DEFAULT_COMPARISON_MODE.getName(), ComparisonMode.allNames());
 
     private final String flag;
-    private final String helptext;
+    private final String description;
     private final Optional<Object> defaultValue;
     private final Optional<Collection<String>> choices;
     private final Class<?> type;
 
-    private CommandLineArgument(String flag, Class<?> type, String helpText) {
-        this(flag, type, helpText, Optional.empty(), Optional.empty());
+    private CommandLineArgument(String flag, Class<?> type) {
+        this(flag, type, Optional.empty(), Optional.empty());
     }
 
-    private CommandLineArgument(String flag, Class<?> type, String helpText, Object defaultValue) {
-        this(flag, type, helpText, Optional.of(defaultValue), Optional.empty());
+    private CommandLineArgument(String flag, Class<?> type, Object defaultValue) {
+        this(flag, type, Optional.of(defaultValue), Optional.empty());
     }
 
-    private CommandLineArgument(String flag, Class<?> type, String helpText, Object defaultValue, Collection<String> choices) {
-        this(flag, type, helpText, Optional.of(defaultValue), Optional.of(choices));
+    private CommandLineArgument(String flag, Class<?> type, Object defaultValue, Collection<String> choices) {
+        this(flag, type, Optional.of(defaultValue), Optional.of(choices));
     }
 
-    private CommandLineArgument(String flag, Class<?> type, String helpText, Optional<Object> defaultValue, Optional<Collection<String>> choices) {
+    private CommandLineArgument(String flag, Class<?> type, Optional<Object> defaultValue, Optional<Collection<String>> choices) {
         this.flag = flag;
-        this.helptext = helpText;
         this.type = type;
         this.defaultValue = defaultValue;
         this.choices = choices;
+        this.description = retrieveDescriptionFromMessages();
     }
-    
+
     /**
      * @return the flag name of the command line argument.
      */
@@ -90,7 +90,7 @@ public enum CommandLineArgument {
      * @param parser is that parser.
      */
     public void parseWith(ArgumentParser parser) {
-        Argument argument = parser.addArgument(flag).help(helptext);
+        Argument argument = parser.addArgument(flag).help(description);
         choices.ifPresent(it -> argument.choices(it));
         defaultValue.ifPresent(it -> argument.setDefault(it));
         argument.type(type);
@@ -98,4 +98,17 @@ public enum CommandLineArgument {
             argument.action(storeTrue());
         }
     }
+
+    /**
+     * Dynamically loads the description from the message file. For an option named <code>NEW_OPTION</code> the messages key should
+     * be <code>CommandLineArgument.NewOption</code>.
+     */
+    private String retrieveDescriptionFromMessages() {
+        StringBuilder builder = new StringBuilder();
+        for (String substring : toString().toLowerCase().split("_")) {
+            builder.append(substring.substring(0, 1).toUpperCase());
+            builder.append(substring.substring(1));
+        }
+        return Messages.getString(getClass().getSimpleName() + "." + builder.toString());
+    }
 }

+ 25 - 26
jplag/src/main/java/de/jplag/JPlag.java

@@ -13,6 +13,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.stream.Collectors;
 
 import de.jplag.options.JPlagOptions;
@@ -40,7 +41,7 @@ public class JPlag implements Program {
     // ERROR REPORTING:
     private String currentSubmissionName = "<Unknown submission>"; // TODO PB: This should be moved to parseSubmissions(...)
     private int errors = 0;
-    private ArrayList<String> errorVector = new ArrayList<>(); // Vector of errors that occurred during the execution of the program.
+    private List<String> errorVector = new ArrayList<>(); // Vector of errors that occurred during the execution of the program.
 
     /**
      * Creates and initializes a JPlag instance, parameterized by a set of options.
@@ -104,7 +105,7 @@ public class JPlag implements Program {
      * @return the program options which allow to configure JPlag.
      */
     protected JPlagOptions getOptions() {
-        return this.options; // TS: Should not be accessible, as options should be set before passing them to this class.
+        return this.options; // TODO TS: Should not be accessible, as options should be set before passing them to this class.
     }
 
     /**
@@ -149,33 +150,30 @@ public class JPlag implements Program {
      * This method checks whether the base code directory value is valid.
      */
     private void checkBaseCodeOption() throws ExitException {
-        if (!this.options.hasBaseCode()) {
-            return;
-        }
-
-        String baseCodePath = this.options.getRootDirectoryName() + File.separator + this.options.getBaseCodeSubmissionName();
-
-        if (!(new File(this.options.getRootDirectoryName())).exists()) {
-            throw new ExitException("Root directory \"" + this.options.getRootDirectoryName() + "\" doesn't exist!", ExitException.BAD_PARAMETER);
-        }
-
-        File f = new File(baseCodePath);
-
-        if (!f.exists()) {
-            // Base code dir doesn't exist
-            throw new ExitException("Basecode directory \"" + baseCodePath + "\" doesn't exist!", ExitException.BAD_PARAMETER);
-        }
+        if (options.hasBaseCode()) {
+            if (!new File(options.getRootDirectoryName()).exists()) {
+                throw new ExitException("Root directory \"" + options.getRootDirectoryName() + "\" doesn't exist!", ExitException.BAD_PARAMETER);
+            }
 
-        if (this.options.getSubdirectoryName() != null && this.options.getSubdirectoryName().length() != 0) {
-            f = new File(baseCodePath, this.options.getSubdirectoryName());
+            String baseCode = options.getBaseCodeSubmissionName().replace(File.separator, ""); // trim problematic file separators
+            if (baseCode.contains(".")) {
+                throw new ExitException("The basecode directory name \"" + baseCode + "\" cannot contain dots!", ExitException.BAD_PARAMETER);
+            }
+            String baseCodePath = options.getRootDirectoryName() + File.separator + baseCode;
+            if (!new File(baseCodePath).exists()) {
+                throw new ExitException("Basecode directory \"" + baseCodePath + "\" doesn't exist!", ExitException.BAD_PARAMETER);
+            }
 
-            if (!f.exists()) {
-                throw new ExitException("Basecode directory doesn't contain" + " the subdirectory \"" + this.options.getSubdirectoryName() + "\"!",
-                        ExitException.BAD_PARAMETER);
+            String subdirectory = options.getSubdirectoryName();
+            if (subdirectory != null && subdirectory.length() != 0) {
+                if (!new File(baseCodePath, subdirectory).exists()) {
+                    throw new ExitException("Basecode directory doesn't contain" + " the subdirectory \"" + subdirectory + "\"!",
+                            ExitException.BAD_PARAMETER);
+                }
             }
+            options.setBaseCodeSubmissionName(baseCode);
+            System.out.println("Basecode directory \"" + baseCodePath + "\" will be used");
         }
-
-        System.out.println("Basecode directory \"" + baseCodePath + "\" will be used");
     }
 
     private ArrayList<Submission> filterValidSubmissions(ArrayList<Submission> submissions) {
@@ -366,6 +364,7 @@ public class JPlag implements Program {
                 subm.setTokenList(null);
                 invalid++;
                 removed = true;
+                iter.remove();
             }
 
             if (ok && !removed) {
@@ -381,7 +380,7 @@ public class JPlag implements Program {
         if (invalid != 0) {
             print(null,
                     invalid + ((invalid == 1) ? " submission is not valid because it contains" : " submissions are not valid because they contain")
-                            + " fewer tokens\nthan minimum match length allows.\n");
+                            + " fewer tokens than minimum match length allows.\n");
         }
 
         long time = System.currentTimeMillis() - msec;

+ 9 - 18
jplag/src/main/java/de/jplag/JPlagResult.java

@@ -66,31 +66,22 @@ public class JPlagResult {
     }
 
     /**
-     * @return a list of all comparisons sorted by percentage (descending).
-     */
-    public List<JPlagComparison> getAllComparisons() {
-        return comparisons;
-    }
-
-    /**
-     * @return a list of comparisons sorted by percentage (descending). the maximum number of comparisons is limited by the
-     * settings set in JPlagOptions
+     * @return a list of all comparisons sorted by percentage (descending)
      */
     public List<JPlagComparison> getComparisons() {
-        if (this.options.getMaximumNumberOfMatches() == -1) {
-            return this.getAllComparisons();
-        } else {
-            return this.getComparisons(this.options.getMaximumNumberOfMatches());
-        }
+        return comparisons;
     }
 
     /**
      * Returns the first n comparisons (sorted by percentage, descending), limited by the specified parameter.
-     * @param maxCount the maximum number of yield comparisons
-     * @return a list of comparisons with a size of maxCount or less
+     * @param numberOfComparisons specifies the number of requested comparisons. If set to -1, all comparisons will be returned.
+     * @return a list of comparisons sorted descending by percentage.
      */
-    public List<JPlagComparison> getComparisons(int maxCount) {
-        return comparisons.subList(0, Math.min(maxCount, comparisons.size()));
+    public List<JPlagComparison> getComparisons(int numberOfComparisons) {
+        if (numberOfComparisons == -1) {
+            return comparisons;
+        }
+        return comparisons.subList(0, Math.min(numberOfComparisons, comparisons.size()));
     }
 
     /**

+ 21 - 0
jplag/src/main/java/de/jplag/Messages.java

@@ -0,0 +1,21 @@
+package de.jplag;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+    private static final String BUNDLE_NAME = "de.jplag.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+    private Messages() {
+    }
+
+    public static String getString(String key) {
+        try {
+            return RESOURCE_BUNDLE.getString(key);
+        } catch (MissingResourceException e) {
+            return '!' + key + '!';
+        }
+    }
+}

+ 20 - 15
jplag/src/main/java/de/jplag/options/JPlagOptions.java

@@ -12,8 +12,8 @@ public class JPlagOptions {
 
     public static final ComparisonMode DEFAULT_COMPARISON_MODE = NORMAL;
     public static final float DEFAULT_SIMILARITY_THRESHOLD = 0;
-    public static final int DEFAULT_STORED_MATCHES = 30;
-    
+    public static final int DEFAULT_SHOWN_COMPARISONS = 30;
+
     public static final Charset CHARSET = StandardCharsets.UTF_8;
 
     /**
@@ -37,24 +37,29 @@ public class JPlagOptions {
     private String[] fileSuffixes;
 
     /**
-     * Percentage value (must be between 0 and 100). Matches with a similarity below this threshold will be ignored. The
-     * default value of 0 allows all matches to be stored.
+     * Percentage value (must be between 0 and 100). Comparisons (of submissions pairs) with a similarity below this
+     * threshold will be ignored. The default value of 0 allows all matches to be stored. This affects which comparisons are
+     * stored and thus make it into the result object.
+     * @see JPlagOptions.similarityMetric
      */
     private float similarityThreshold = DEFAULT_SIMILARITY_THRESHOLD;
 
     /**
-     * The maximum number of matches that will be saved. This does affect the generated report as well as the internally
-     * saved comparisons. If set to -1 all matches will be saved.
+     * The maximum number of comparisons that will be shown in the generated report. If set to -1 all comparisons will be
+     * shown.
      */
-    private int maximumNumberOfMatches = DEFAULT_STORED_MATCHES;
+    private int maximumNumberOfComparisons = DEFAULT_SHOWN_COMPARISONS;
 
     /**
-     * TODO PB: Not happy with the name yet.
+     * The similarity metric determines how the minimum similarity threshold required for a comparison (of two submissions)
+     * is calculated. This affects which comparisons are stored and thus make it into the result object.
+     * @see JPlagOptions.similarityThreshold
      */
     private SimilarityMetric similarityMetric = SimilarityMetric.AVG;
 
     /**
-     * Tune the sensitivity of the comparison. A smaller <n> increases the sensitivity
+     * Tunes the comparison sensitivity by adjusting the minimum token required to be counted as matching section. A smaller
+     * <n> increases the sensitivity but might lead to more false-positves.
      */
     private Integer minimumTokenMatch;
 
@@ -172,8 +177,8 @@ public class JPlagOptions {
         return similarityThreshold;
     }
 
-    public int getMaximumNumberOfMatches() {
-        return this.maximumNumberOfMatches;
+    public int getMaximumNumberOfComparisons() {
+        return this.maximumNumberOfComparisons;
     }
 
     public SimilarityMetric getSimilarityMetric() {
@@ -240,11 +245,11 @@ public class JPlagOptions {
         }
     }
 
-    public void setMaximumNumberOfMatches(int maximumNumberOfMatches) {
-        if (maximumNumberOfMatches < -1) {
-            this.maximumNumberOfMatches = -1;
+    public void setMaximumNumberOfComparisons(int maximumNumberOfComparisons) {
+        if (maximumNumberOfComparisons < -1) {
+            this.maximumNumberOfComparisons = -1;
         } else {
-            this.maximumNumberOfMatches = maximumNumberOfMatches;
+            this.maximumNumberOfComparisons = maximumNumberOfComparisons;
         }
     }
 

+ 13 - 10
jplag/src/main/java/de/jplag/reporting/Report.java

@@ -36,6 +36,7 @@ public class Report { // Mostly legacy code with some minor improvements.
     private final Map<JPlagComparison, Integer> comparisonToIndex = new HashMap<>();
     private final Messages msg;
     private final File reportDir;
+    private final JPlagOptions options;
 
     private JPlagResult result;
 
@@ -43,9 +44,10 @@ public class Report { // Mostly legacy code with some minor improvements.
     private int matchWritingProgess = 0;
     private int matchesWritten = 0;
 
-    public Report(File reportDir) throws ExitException {
+    public Report(File reportDir, JPlagOptions options) throws ExitException {
         this.reportDir = reportDir;
-        this.msg = new Messages("en");
+        this.options = options;
+        msg = new Messages("en");
 
         validateReportDir();
     }
@@ -55,7 +57,7 @@ public class Report { // Mostly legacy code with some minor improvements.
         System.out.println("Writing report...");
         writeIndex();
         copyStaticFiles();
-        writeMatches(result.getComparisons());
+        writeMatches(result.getComparisons(options.getMaximumNumberOfComparisons()));
         System.out.println("Report exported to " + reportDir.getAbsolutePath());
     }
 
@@ -140,7 +142,8 @@ public class Report { // Mostly legacy code with some minor improvements.
 
         htmlFile.println("<TABLE BORDER=\"1\" CELLSPACING=\"0\" BGCOLOR=\"#d0d0d0\">");
         htmlFile.println("<TR><TH><TH>" + comparison.getFirstSubmission().getName() + " (" + comparison.similarityOfFirst() + "%)<TH>"
-                + comparison.getSecondSubmission().getName() + " (" + comparison.similarityOfSecond() + "%)<TH>" + msg.getString("AllMatches.Tokens"));
+                + comparison.getSecondSubmission().getName() + " (" + comparison.similarityOfSecond() + "%)<TH>"
+                + msg.getString("AllMatches.Tokens"));
 
         for (int i = 0; i < comparison.getMatches().size(); i++) {
             match = comparison.getMatches().get(i);
@@ -444,11 +447,11 @@ public class Report { // Mostly legacy code with some minor improvements.
                     + result.getOptions().getBaseCodeSubmissionName() + "</TD></TR>");
         }
 
-        if (result.getComparisons().size() > 0) {
+        if (options.getMaximumNumberOfComparisons() > 0) {
             htmlFile.println("<TR BGCOLOR=#aaaaff VALIGN=top><TD>" + msg.getString("Report.Matches_displayed") + ":</TD>" + "<TD>");
-
-            htmlFile.println(result.getComparisons().size() + " of " + result.getAllComparisons().size() + " (" + msg.getString("Report.Treshold")
-                    + ": " + result.getOptions().getSimilarityThreshold() + "%)<br>");
+            // TODO TS every instance of getComparisons must be replaced by get N in this class!
+            htmlFile.println(options.getMaximumNumberOfComparisons() + " of " + result.getComparisons().size() + " ("
+                    + msg.getString("Report.Treshold") + ": " + result.getOptions().getSimilarityThreshold() + "%)<br>");
 
             htmlFile.println("</TD></TR>");
         }
@@ -553,7 +556,7 @@ public class Report { // Mostly legacy code with some minor improvements.
     }
 
     private void writeLinksToComparisons(HTMLFile htmlFile, String headerStr, String csvFile) {
-        List<JPlagComparison> comparisons = result.getComparisons(); // should be already sorted!
+        List<JPlagComparison> comparisons = result.getComparisons(options.getMaximumNumberOfComparisons()); // should be already sorted!
 
         htmlFile.println(headerStr + " (<a href=\"help-sim-" + "en" // Country tag
                 + ".html\"><small><font color=\"#000088\">" + msg.getString("Report.WhatIsThis") + "</font></small></a>):</H4>");
@@ -649,7 +652,7 @@ public class Report { // Mostly legacy code with some minor improvements.
     private void writeMatchesCSV(String fileName) {
         FileWriter writer = null;
         File csvFile = new File(reportDir, fileName);
-        List<JPlagComparison> comparisons = result.getComparisons();
+        List<JPlagComparison> comparisons = result.getComparisons(options.getMaximumNumberOfComparisons());
 
         try {
             csvFile.createNewFile();

+ 2 - 2
jplag/src/main/java/de/jplag/strategy/AbstractComparisonStrategy.java

@@ -1,7 +1,7 @@
 package de.jplag.strategy;
 
-import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.List;
 import java.util.Optional;
 
 import de.jplag.GreedyStringTiling;
@@ -24,7 +24,7 @@ public abstract class AbstractComparisonStrategy implements ComparisonStrategy {
         this.options = options;
     }
 
-    protected void compareSubmissionsToBaseCode(ArrayList<Submission> submissions, Submission baseCodeSubmission) {
+    protected void compareSubmissionsToBaseCode(List<Submission> submissions, Submission baseCodeSubmission) {
         for (Submission currentSubmission : submissions) {
             JPlagComparison baseCodeMatch = greedyStringTiling.compareWithBaseCode(currentSubmission, baseCodeSubmission);
             baseCodeMatches.put(currentSubmission.getName(), baseCodeMatch);

+ 2 - 2
jplag/src/main/java/de/jplag/strategy/ComparisonStrategy.java

@@ -1,6 +1,6 @@
 package de.jplag.strategy;
 
-import java.util.ArrayList;
+import java.util.List;
 
 import de.jplag.JPlagResult;
 import de.jplag.Submission;
@@ -16,5 +16,5 @@ public interface ComparisonStrategy {
      * @param baseCodeSubmission is the base code on which each submission is based on.
      * @return the comparison results.
      */
-    JPlagResult compareSubmissions(ArrayList<Submission> submissions, Submission baseCodeSubmission);
+    JPlagResult compareSubmissions(List<Submission> submissions, Submission baseCodeSubmission);
 }

+ 1 - 1
jplag/src/main/java/de/jplag/strategy/NormalComparisonStrategy.java

@@ -16,7 +16,7 @@ public class NormalComparisonStrategy extends AbstractComparisonStrategy {
     }
 
     @Override
-    public JPlagResult compareSubmissions(ArrayList<Submission> submissions, Submission baseCodeSubmission) {
+    public JPlagResult compareSubmissions(List<Submission> submissions, Submission baseCodeSubmission) {
         boolean withBaseCode = baseCodeSubmission != null;
         if (withBaseCode) {
             compareSubmissionsToBaseCode(submissions, baseCodeSubmission);

+ 3 - 3
jplag/src/main/java/de/jplag/strategy/ParallelComparisonStrategy.java

@@ -35,14 +35,14 @@ public class ParallelComparisonStrategy extends AbstractComparisonStrategy {
     }
 
     @Override
-    public JPlagResult compareSubmissions(ArrayList<Submission> submissions, Submission baseCodeSubmission) {
+    public JPlagResult compareSubmissions(List<Submission> submissions, Submission baseCodeSubmission) {
         // Initialize:
         long timeBeforeStartInMillis = System.currentTimeMillis();
         boolean withBaseCode = baseCodeSubmission != null;
         if (withBaseCode) {
             compareSubmissionsToBaseCode(submissions, baseCodeSubmission);
         }
-        threadPool = Executors.newCachedThreadPool();
+        threadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
         comparisons.clear();
         submissionLocks.clear();
         successfulComparisons = 0;
@@ -72,7 +72,7 @@ public class ParallelComparisonStrategy extends AbstractComparisonStrategy {
     /**
      * @return a list of all submission tuples to be processed.
      */
-    private List<SubmissionTuple> buildComparisonTuples(ArrayList<Submission> submissions) {
+    private List<SubmissionTuple> buildComparisonTuples(List<Submission> submissions) {
         List<SubmissionTuple> tuples = new ArrayList<>();
         for (int i = 0; i < (submissions.size() - 1); i++) {
             Submission first = submissions.get(i);

+ 13 - 0
jplag/src/main/resources/de/jplag/messages.properties

@@ -0,0 +1,13 @@
+CommandLineArgument.BaseCode=Name of the subdirectory of the root directory which contains the base code (common framework used in all submissions)
+CommandLineArgument.ComparisonMode=Comparison mode used to compare the programs
+CommandLineArgument.Debug=Debug parser. Non-parsable files will be stored
+CommandLineArgument.Suffixes=comma-separated list of all filename suffixes that are included
+CommandLineArgument.ExcludeFile=All files named in this file will be ignored in the comparison (line-separated list)
+CommandLineArgument.Language=Select the language to parse the submissions
+CommandLineArgument.MinTokenMatch=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
+CommandLineArgument.ResultFolder=Name of the directory in which the comparison results will be stored
+CommandLineArgument.RootDirectory=The root-directory that contains all submissions
+CommandLineArgument.ShownComparisons=The maximum number of comparisons that will be shown in the generated report, if set to -1 all comparisons will be shown
+CommandLineArgument.SimilarityThreshold=Comparison similarity threshold [0-100]: All comparisons above this threshold will be saved
+CommandLineArgument.Subdirectory=Look in directories <root-dir>/*/<dir> for programs
+CommandLineArgument.Verbosity=Verbosity of the logging

+ 45 - 0
jplag/src/test/java/de/jplag/BaseCodeTest.java

@@ -0,0 +1,45 @@
+package de.jplag;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+
+import org.junit.Test;
+
+public class BaseCodeTest extends TestBase {
+
+    @Test
+    public void testBasecodeComparison() throws ExitException {
+        JPlagResult result = runJPlag("basecode", it -> it.setBaseCodeSubmissionName("base"));
+        verifyResults(result);
+    }
+
+    @Test
+    public void testAutoTrimFileSeparators() throws ExitException {
+        JPlagResult result = runJPlag("basecode", it -> it.setBaseCodeSubmissionName(File.separator + "base" + File.separator));
+        verifyResults(result);
+    }
+
+    private void verifyResults(JPlagResult result) {
+        assertEquals(2, result.getNumberOfSubmissions());
+        assertEquals(1, result.getComparisons().size());
+        assertEquals(1, result.getComparisons().get(0).getMatches().size());
+        assertEquals(1, result.getSimilarityDistribution()[8]);
+        assertEquals(85f, result.getComparisons().get(0).similarity(), DELTA);
+    }
+
+    @Test(expected = ExitException.class)
+    public void testInvalidRoot() throws ExitException {
+        runJPlag("basecode", it -> it.setRootDirectoryName("WrongRoot"));
+    }
+
+    @Test(expected = ExitException.class)
+    public void testInvalidBasecode() throws ExitException {
+        runJPlag("basecode", it -> it.setBaseCodeSubmissionName("WrongBasecode"));
+    }
+
+    @Test(expected = ExitException.class)
+    public void testBasecodeWithDots() throws ExitException {
+        runJPlag("basecode", it -> it.setBaseCodeSubmissionName("." + File.separator + "base"));
+    }
+}

+ 5 - 5
jplag/src/test/java/de/jplag/NormalComparisonTest.java

@@ -32,7 +32,7 @@ public class NormalComparisonTest extends TestBase {
         assertEquals(3, result.getNumberOfSubmissions());
         assertEquals(3, result.getComparisons().size());
 
-        result.getAllComparisons().forEach(comparison -> {
+        result.getComparisons().forEach(comparison -> {
             assertEquals(0f, comparison.similarity(), 0.1f);
         });
     }
@@ -50,16 +50,16 @@ public class NormalComparisonTest extends TestBase {
         JPlagResult result = runJPlagWithDefaultOptions("PartialPlagiarism");
 
         assertEquals(5, result.getNumberOfSubmissions());
-        assertEquals(10, result.getAllComparisons().size());
+        assertEquals(10, result.getComparisons().size());
 
         // All comparisons with E shall have no matches
-        result.getAllComparisons()
+        result.getComparisons()
                 .stream()
                 .filter(comparison ->
                         comparison.getSecondSubmission().getName().equals("E") ||
                                 comparison.getFirstSubmission().getName().equals("E"))
                 .forEach(comparison ->
-                        assertEquals(0f, comparison.similarity(), 0.1f)
+                        assertEquals(0f, comparison.similarity(), DELTA)
                 );
 
         // Hard coded assertions on selected comparisons
@@ -86,7 +86,7 @@ public class NormalComparisonTest extends TestBase {
     }
 
     private Optional<JPlagComparison> getSelectedComparison(JPlagResult result, String nameA, String nameB) {
-        return result.getAllComparisons().stream()
+        return result.getComparisons().stream()
                 .filter(comparison ->
                         comparison.getFirstSubmission().getName().equals(nameA) &&
                                 comparison.getSecondSubmission().getName().equals(nameB) ||

+ 15 - 15
jplag/src/test/java/de/jplag/ParallelComparisonTest.java

@@ -26,7 +26,7 @@ public class ParallelComparisonTest extends TestBase {
         assertEquals(1, result.getComparisons().size());
         assertEquals(1, result.getComparisons().get(0).getMatches().size());
         assertEquals(1, result.getSimilarityDistribution()[6]);
-        assertEquals(62.07f, result.getComparisons().get(0).similarity(), 0.1f);
+        assertEquals(62.07f, result.getComparisons().get(0).similarity(), DELTA);
     }
 
     /**
@@ -39,8 +39,8 @@ public class ParallelComparisonTest extends TestBase {
         assertEquals(3, result.getNumberOfSubmissions());
         assertEquals(3, result.getComparisons().size());
 
-        result.getAllComparisons().forEach(comparison -> {
-            assertEquals(0f, comparison.similarity(), 0.1f);
+        result.getComparisons().forEach(comparison -> {
+            assertEquals(0f, comparison.similarity(), DELTA);
         });
     }
 
@@ -54,25 +54,25 @@ public class ParallelComparisonTest extends TestBase {
         JPlagResult result = runJPlag("PartialPlagiarism", it -> it.setComparisonMode(PARALLEL));
 
         assertEquals(5, result.getNumberOfSubmissions());
-        assertEquals(10, result.getAllComparisons().size());
+        assertEquals(10, result.getComparisons().size());
 
         // All comparisons with E shall have no matches
-        result.getAllComparisons().stream()
+        result.getComparisons().stream()
                 .filter(comparison -> comparison.getSecondSubmission().getName().equals("E") || comparison.getFirstSubmission().getName().equals("E"))
-                .forEach(comparison -> assertEquals(0f, comparison.similarity(), 0.1f));
+                .forEach(comparison -> assertEquals(0f, comparison.similarity(), DELTA));
 
         // Hard coded assertions on selected comparisons
-        assertEquals(24.6f, getSelectedPercent(result, "A", "B"), 0.1f);
-        assertEquals(99.7f, getSelectedPercent(result, "A", "C"), 0.1f);
-        assertEquals(77.9f, getSelectedPercent(result, "A", "D"), 0.1f);
-        assertEquals(24.6f, getSelectedPercent(result, "B", "C"), 0.1f);
-        assertEquals(28.3f, getSelectedPercent(result, "B", "D"), 0.1f);
-        assertEquals(77.9f, getSelectedPercent(result, "C", "D"), 0.1f);
+        assertEquals(24.6f, getSelectedPercent(result, "A", "B"), DELTA);
+        assertEquals(99.7f, getSelectedPercent(result, "A", "C"), DELTA);
+        assertEquals(77.9f, getSelectedPercent(result, "A", "D"), DELTA);
+        assertEquals(24.6f, getSelectedPercent(result, "B", "C"), DELTA);
+        assertEquals(28.3f, getSelectedPercent(result, "B", "D"), DELTA);
+        assertEquals(77.9f, getSelectedPercent(result, "C", "D"), DELTA);
 
         // More detailed assertions for the plagiarism in A-D
         var biggestMatch = getSelectedComparison(result, "A", "D");
-        assertEquals(96.4f, biggestMatch.get().maximalSimilarity(), 0.1f);
-        assertEquals(65.3f, biggestMatch.get().minimalSimilarity(), 0.1f);
+        assertEquals(96.4f, biggestMatch.get().maximalSimilarity(), DELTA);
+        assertEquals(65.3f, biggestMatch.get().minimalSimilarity(), DELTA);
         assertEquals(12, biggestMatch.get().getMatches().size());
 
     }
@@ -83,7 +83,7 @@ public class ParallelComparisonTest extends TestBase {
     }
 
     private Optional<JPlagComparison> getSelectedComparison(JPlagResult result, String nameA, String nameB) {
-        return result.getAllComparisons().stream()
+        return result.getComparisons().stream()
                 .filter(comparison -> comparison.getFirstSubmission().getName().equals(nameA) && comparison.getSecondSubmission().getName().equals(nameB)
                         || comparison.getFirstSubmission().getName().equals(nameB) && comparison.getSecondSubmission().getName().equals(nameA))
                 .findFirst();

+ 7 - 4
jplag/src/test/java/de/jplag/TestBase.java

@@ -1,5 +1,6 @@
 package de.jplag;
 
+import java.nio.file.Path;
 import java.util.function.Consumer;
 
 import de.jplag.options.JPlagOptions;
@@ -8,23 +9,25 @@ import de.jplag.options.Verbosity;
 
 public abstract class TestBase {
 
-    private static final String BASE_PATH = "src/test/resources/de/jplag/samples";
+    private static final String BASE_PATH = Path.of("src", "test", "resources", "de", "jplag", "samples").toString();
+    protected static final float DELTA = 0.1f;
 
     protected String getBasePath() {
         return BASE_PATH;
     }
 
     protected JPlagResult runJPlagWithExclusionFile(String testSampleName, String exclusionFileName) throws ExitException {
-        String blackList = String.format(getBasePath() + "/%s/%s", testSampleName, exclusionFileName);
+        String blackList = Path.of(BASE_PATH, testSampleName, exclusionFileName).toString();
         return runJPlag(testSampleName, options -> options.setExclusionFileName(blackList));
     }
 
     protected JPlagResult runJPlagWithDefaultOptions(String testSampleName) throws ExitException {
-        return runJPlag(testSampleName, options -> {});
+        return runJPlag(testSampleName, options -> {
+        });
     }
 
     protected JPlagResult runJPlag(String testSampleName, Consumer<JPlagOptions> customization) throws ExitException {
-        JPlagOptions options = new JPlagOptions(String.format(getBasePath() + "/%s", testSampleName), LanguageOption.JAVA_1_9);
+        JPlagOptions options = new JPlagOptions(Path.of(BASE_PATH, testSampleName).toString(), LanguageOption.JAVA_1_9);
         options.setVerbosity(Verbosity.LONG);
         customization.accept(options);
         JPlag jplag = new JPlag(options);

+ 4 - 4
jplag/src/test/java/de/jplag/VolumeTest.java

@@ -44,18 +44,18 @@ public class VolumeTest extends TestBase {
         }
 
         var results = runJPlag("data",
-                jPlagOptions -> jPlagOptions.setMaximumNumberOfMatches(-1));
+                jPlagOptions -> jPlagOptions.setMaximumNumberOfComparisons(-1));
 
         var csv = readCSVResults(String.format("%s/%s", this.getBasePath(), "matches_avg.csv"));
 
-        assertEquals(csv.size(), results.getAllComparisons().size());
+        assertEquals(csv.size(), results.getComparisons().size());
         System.out.println("Volume test size: " + csv.size());
 
-        results.getAllComparisons().forEach(result -> {
+        results.getComparisons().forEach(result -> {
             var key = result.getFirstSubmission().getName() + result.getSecondSubmission().getName();
 
             assertTrue(csv.containsKey(key));
-            assertEquals(csv.getOrDefault(key, -1f), result.similarity(), 0.1f);
+            assertEquals(csv.getOrDefault(key, -1f), result.similarity(), DELTA);
         });
 
     }

+ 8 - 8
jplag/src/test/java/de/jplag/cli/StoredMatchesTest.java

@@ -17,36 +17,36 @@ public class StoredMatchesTest extends CommandLineInterfaceTest {
     @Test
     public void testDefault() {
         buildOptionsFromCLI(CURRENT_DIRECTORY);
-        assertEquals(JPlagOptions.DEFAULT_STORED_MATCHES, options.getMaximumNumberOfMatches());
+        assertEquals(JPlagOptions.DEFAULT_SHOWN_COMPARISONS, options.getMaximumNumberOfComparisons());
     }
 
     @Test
     public void testValidThreshold() {
         int expectedValue = 999;
-        String argument = buildArgument(CommandLineArgument.STORED_MATCHES, Integer.toString(expectedValue));
+        String argument = buildArgument(CommandLineArgument.SHOWN_COMPARISONS, Integer.toString(expectedValue));
         buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
-        assertEquals(expectedValue, options.getMaximumNumberOfMatches());
+        assertEquals(expectedValue, options.getMaximumNumberOfComparisons());
     }
 
     @Test
     public void testAll() {
         int expectedValue = -1;
-        String argument = buildArgument(CommandLineArgument.STORED_MATCHES, Integer.toString(expectedValue));
+        String argument = buildArgument(CommandLineArgument.SHOWN_COMPARISONS, Integer.toString(expectedValue));
         buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
-        assertEquals(expectedValue, options.getMaximumNumberOfMatches());
+        assertEquals(expectedValue, options.getMaximumNumberOfComparisons());
     }
 
     @Test
     public void testLowerBound() {
-        String argument = buildArgument(CommandLineArgument.STORED_MATCHES, Integer.toString(-2));
+        String argument = buildArgument(CommandLineArgument.SHOWN_COMPARISONS, Integer.toString(-2));
         buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
-        assertEquals(-1, options.getMaximumNumberOfMatches());
+        assertEquals(-1, options.getMaximumNumberOfComparisons());
     }
 
     @Test
     public void testInvalidThreshold() {
         exit.expectSystemExitWithStatus(1);
-        String argument = buildArgument(CommandLineArgument.STORED_MATCHES, "Not an integer...");
+        String argument = buildArgument(CommandLineArgument.SHOWN_COMPARISONS, "Not an integer...");
         buildOptionsFromCLI(argument, CURRENT_DIRECTORY);
     }
 }

+ 27 - 0
jplag/src/test/resources/de/jplag/samples/basecode/A/TerrainType.java

@@ -0,0 +1,27 @@
+package carcassonne.model.terrain;
+
+import java.util.List;
+
+/**
+ * Enumeration for the terrain type. Is used to specify the terrain of a tile on its different positions.
+ * @author Timur Saglam
+ */
+public enum TerrainType {
+    CASTLE,
+    ROAD,
+    MONASTERY,
+    FIELDS,
+    OTHER;
+
+    /**
+     * Generates a list of the basic terrain types, which is every terrain except {@link Other}.
+     * @return a list of CASTLE, ROAD, MONASTERY, FIELDS.
+     */
+    public static List<TerrainType> basicTerrain() {
+        return List.of(CASTLE, ROAD, MONASTERY, FIELDS);
+    }
+
+    public String toReadableString() {
+        return toString().charAt(0) + toString().substring(1).toLowerCase();
+    }
+}

+ 30 - 0
jplag/src/test/resources/de/jplag/samples/basecode/B/TerrainType.java

@@ -0,0 +1,30 @@
+package carcassonne.model.terrain;
+
+import java.util.List;
+
+/**
+ * Enumeration for the terrain type. Is used to specify the terrain of a tile on its different positions.
+ * @author Mean Plagiarizer
+ */
+public enum TerrainType {
+    CASTLE,
+    ROAD,
+    MONASTERY,
+    FIELDS,
+    OTHER;
+
+    private static final int CONST_0 = 0;
+    private static final int CONST_1 = 1;
+
+    /**
+     * Generates a list of the basic terrain types, which is every terrain except {@link Other}.
+     * @return a list of CASTLE, ROAD, MONASTERY, FIELDS.
+     */
+    public static List<TerrainType> basicTerrain() {
+        return List.of(CASTLE, ROAD, MONASTERY, FIELDS);
+    }
+
+    public String toReadableString() {
+        return toString().charAt(CONST_0) + toString().substring(CONST_1).toLowerCase();
+    }
+}

+ 12 - 0
jplag/src/test/resources/de/jplag/samples/basecode/base/TerrainType.java

@@ -0,0 +1,12 @@
+package carcassonne.model.terrain;
+
+/**
+ * Enumeration for the terrain type. Is used to specify the terrain of a tile on its different positions.
+ */
+public enum TerrainType {
+    CASTLE,
+    ROAD,
+    MONASTERY,
+    FIELDS,
+    OTHER;
+}