Browse Source

Remove some duplicates and minors

Dominik Fuchß 4 years ago
parent
commit
f579daf89e

+ 1 - 1
jplag.frontend.csharp-6/src/main/java/de/jplag/csharp/CSharpParserAdapter.java

@@ -54,7 +54,7 @@ public class CSharpParserAdapter extends AbstractParser {
 
 
     private boolean parseFile(File directory, String fileName) {
     private boolean parseFile(File directory, String fileName) {
         File file = new File(directory, fileName);
         File file = new File(directory, fileName);
-        try (FileInputStream inputStream = new FileInputStream(file);) {
+        try (FileInputStream inputStream = new FileInputStream(file)) {
             currentFile = fileName;
             currentFile = fileName;
 
 
             // create a lexer, a parser and a buffer between them.
             // create a lexer, a parser and a buffer between them.

+ 4 - 2
jplag.frontend.csharp-6/src/main/java/de/jplag/csharp/grammar/CSharpPreprocessorParserBase.java

@@ -3,7 +3,9 @@ package de.jplag.csharp.grammar;
 import java.util.HashSet;
 import java.util.HashSet;
 import java.util.Stack;
 import java.util.Stack;
 
 
-import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.Parser;
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.TokenStream;
 
 
 /**
 /**
  * This class was taken from <a href="https://github.com/antlr/grammars-v4/tree/master/csharp">antlr/grammars-v4</a>. It
  * This class was taken from <a href="https://github.com/antlr/grammars-v4/tree/master/csharp">antlr/grammars-v4</a>. It
@@ -65,7 +67,7 @@ abstract class CSharpPreprocessorParserBase extends Parser {
         CSharpPreprocessorParser.PreprocessorConditionalContext d = (CSharpPreprocessorParser.PreprocessorConditionalContext) c;
         CSharpPreprocessorParser.PreprocessorConditionalContext d = (CSharpPreprocessorParser.PreprocessorConditionalContext) c;
         if (!conditions.peek()) {
         if (!conditions.peek()) {
             conditions.pop();
             conditions.pop();
-            d.value = true && AllConditions();
+            d.value = AllConditions();
             conditions.push(true);
             conditions.push(true);
         } else {
         } else {
             d.value = false;
             d.value = false;

+ 1 - 1
jplag.frontend.java/src/main/java/de/jplag/java/JavaTokenConstants.java

@@ -84,5 +84,5 @@ public interface JavaTokenConstants extends TokenConstants {
     int J_RECORD_BEGIN = 68;
     int J_RECORD_BEGIN = 68;
     int J_RECORD_END = 69;
     int J_RECORD_END = 69;
 
 
-    final static int NUM_DIFF_TOKENS = 70;	    // @formatter:on
+    int NUM_DIFF_TOKENS = 70;	    // @formatter:on
 }
 }

+ 0 - 1
jplag/src/main/resources/de/jplag/messages_de.properties

@@ -32,7 +32,6 @@ Report.Matches_for_X1_AND_X2=&Uuml;bereinstimmungen f&uuml;r {1_NAME} & {2_NAME}
 Report.Links=Links
 Report.Links=Links
 Report.INDEX=INDEX
 Report.INDEX=INDEX
 Report.HELP=HILFE
 Report.HELP=HILFE
-Report.Distribution=Verteilung
 Report.Token_Distribution=Verteilung der Token
 Report.Token_Distribution=Verteilung der Token
 
 
 Clusters.MIN_single_link=MIN, einfache Verkn&uuml;pfung
 Clusters.MIN_single_link=MIN, einfache Verkn&uuml;pfung

+ 0 - 1
jplag/src/main/resources/de/jplag/messages_en.properties

@@ -32,7 +32,6 @@ Report.Matches_for_X1_AND_X2=Matches for {1_NAME} & {2_NAME}
 Report.Links=Links
 Report.Links=Links
 Report.INDEX=INDEX
 Report.INDEX=INDEX
 Report.HELP=HELP
 Report.HELP=HELP
-Report.Distribution=Distribution
 Report.Token_Distribution=Token Distribution
 Report.Token_Distribution=Token Distribution
 
 
 Clusters.MIN_single_link=MIN, single link
 Clusters.MIN_single_link=MIN, single link

+ 0 - 2
jplag/src/main/resources/de/jplag/messages_es.properties

@@ -3,7 +3,6 @@ Report.MatchesAvg=Coincidencias clasificadas por la semejanza media
 Report.MatchesMax=Coincidencias clasificadas por semejanza máxima
 Report.MatchesMax=Coincidencias clasificadas por semejanza máxima
 Report.MatchesMin=Coincidencias clasificadas por semejanza mínima
 Report.MatchesMin=Coincidencias clasificadas por semejanza mínima
 Report.average_similarity=semejanza media
 Report.average_similarity=semejanza media
-Report.maximum_similarity=semejanza máxima
 Report.maximum_similarity=semejanza mínima
 Report.maximum_similarity=semejanza mínima
 Report.WhatIsThis=¿Qué es esto?
 Report.WhatIsThis=¿Qué es esto?
 Report.Search_Results=Resultados de la Búsqueda
 Report.Search_Results=Resultados de la Búsqueda
@@ -32,7 +31,6 @@ Report.Matches_for_X1_AND_X2=Coinicdencias para {1_NAME} & {2_NAME}
 Report.Links=Links
 Report.Links=Links
 Report.INDEX=INDICE
 Report.INDEX=INDICE
 Report.HELP=AYUDA
 Report.HELP=AYUDA
-Report.Distribution=Distribución
 Report.Token_Distribution=Distribución de símbolos
 Report.Token_Distribution=Distribución de símbolos
 
 
 Clusters.MIN_single_link=MIN, link único
 Clusters.MIN_single_link=MIN, link único

+ 0 - 1
jplag/src/main/resources/de/jplag/messages_fr.properties

@@ -32,7 +32,6 @@ Report.Matches_for_X1_AND_X2=Ressemblance pour {1_NAME} & {2_NAME}
 Report.Links=Liens
 Report.Links=Liens
 Report.INDEX=INDEX
 Report.INDEX=INDEX
 Report.HELP=AIDE
 Report.HELP=AIDE
-Report.Distribution=Repartition
 Report.Token_Distribution=Repartition des tokens
 Report.Token_Distribution=Repartition des tokens
 
 
 Clusters.MIN_single_link=MIN, single link
 Clusters.MIN_single_link=MIN, single link

+ 0 - 1
jplag/src/main/resources/de/jplag/messages_pt.properties

@@ -32,7 +32,6 @@ Report.Matches_for_X1_AND_X2=Matches for {1_NAME} & {2_NAME}
 Report.Links=Links
 Report.Links=Links
 Report.INDEX=INDEX
 Report.INDEX=INDEX
 Report.HELP=HELP
 Report.HELP=HELP
-Report.Distribution=Distribution
 Report.Token_Distribution=Token Distribution
 Report.Token_Distribution=Token Distribution
 
 
 Clusters.MIN_single_link=MIN, single link
 Clusters.MIN_single_link=MIN, single link