Browse Source

Fix command-line argument description and options JDoc of the min token match.

Timur Sağlam 5 years ago
parent
commit
1eb3c5060b

+ 1 - 1
jplag/src/main/java/de/jplag/CommandLineArgument.java

@@ -28,7 +28,7 @@ public enum CommandLineArgument {
     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"),
+    MIN_TOKEN_MATCH("-t", Integer.class, "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"),
     SIMILARITY_THRESHOLD("-m", Float.class, "Match similarity threshold [0-100]: All matches above this threshold will be saved", DEFAULT_SIMILARITY_THRESHOLD),
     SHOWN_COMPARISONS("-n", Integer.class, "The maximum number of comparisons that will be shown in the generated report, if set to -1 all comparisons will be shown", DEFAULT_SHOWN_COMPARISONS),
     RESULT_FOLDER("-r", String.class, "Name of directory in which the comparison results will be stored", "result"),

+ 1 - 1
jplag/src/main/java/de/jplag/JPlag.java

@@ -105,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.
     }
 
     /**

+ 11 - 8
jplag/src/main/java/de/jplag/options/JPlagOptions.java

@@ -13,7 +13,7 @@ public class JPlagOptions {
     public static final ComparisonMode DEFAULT_COMPARISON_MODE = NORMAL;
     public static final float DEFAULT_SIMILARITY_THRESHOLD = 0;
     public static final int DEFAULT_SHOWN_COMPARISONS = 30;
-    
+
     public static final Charset CHARSET = StandardCharsets.UTF_8;
 
     /**
@@ -37,26 +37,29 @@ public class JPlagOptions {
     private String[] fileSuffixes;
 
     /**
-     * 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.
+     * 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 comparisons that will be shown in the generated report. If set to -1 all comparisons will be shown.
+     * The maximum number of comparisons that will be shown in the generated report. If set to -1 all comparisons will be
+     * shown.
      */
     private int maximumNumberOfComparisons = DEFAULT_SHOWN_COMPARISONS;
 
     /**
-     * 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.
+     * 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;
 
@@ -173,7 +176,7 @@ public class JPlagOptions {
     public float getSimilarityThreshold() {
         return similarityThreshold;
     }
-    
+
     public int getMaximumNumberOfComparisons() {
         return this.maximumNumberOfComparisons;
     }