From c381ef44da8b734bc6300e39c301369139b6075d Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Mon, 27 Feb 2012 15:51:06 +0100 Subject: [maven-release-plugin] prepare release 2.14-RC1 --- plugins/sonar-cpd-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/sonar-cpd-plugin') diff --git a/plugins/sonar-cpd-plugin/pom.xml b/plugins/sonar-cpd-plugin/pom.xml index 67bf5eb3d85..2aea093aa65 100644 --- a/plugins/sonar-cpd-plugin/pom.xml +++ b/plugins/sonar-cpd-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-SNAPSHOT + 2.14-RC1 ../.. org.codehaus.sonar.plugins -- cgit v1.2.3 From 5eec0522412016db9ee307a6c7fe7db859e8a6d2 Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Mon, 27 Feb 2012 15:51:07 +0100 Subject: [maven-release-plugin] prepare for next development iteration --- plugins/sonar-checkstyle-plugin/pom.xml | 2 +- plugins/sonar-cobertura-plugin/pom.xml | 2 +- plugins/sonar-core-gwt/pom.xml | 2 +- plugins/sonar-core-plugin/pom.xml | 2 +- plugins/sonar-cpd-plugin/pom.xml | 2 +- plugins/sonar-dbcleaner-plugin/pom.xml | 2 +- plugins/sonar-design-plugin/pom.xml | 2 +- plugins/sonar-email-notifications-plugin/pom.xml | 2 +- plugins/sonar-findbugs-plugin/pom.xml | 2 +- plugins/sonar-jacoco-plugin/pom.xml | 2 +- plugins/sonar-l10n-en-plugin/pom.xml | 2 +- plugins/sonar-pmd-plugin/pom.xml | 2 +- plugins/sonar-squid-java-plugin/pom.xml | 2 +- plugins/sonar-surefire-plugin/pom.xml | 2 +- pom.xml | 2 +- sonar-application/pom.xml | 2 +- sonar-batch-bootstrapper/pom.xml | 2 +- sonar-batch-maven-compat/pom.xml | 2 +- sonar-batch/pom.xml | 2 +- sonar-channel/pom.xml | 2 +- sonar-check-api/pom.xml | 2 +- sonar-colorizer/pom.xml | 2 +- sonar-core/pom.xml | 2 +- sonar-deprecated/pom.xml | 2 +- sonar-duplications/pom.xml | 2 +- sonar-graph/pom.xml | 2 +- sonar-gwt-api/pom.xml | 2 +- sonar-java-api/pom.xml | 2 +- sonar-markdown/pom.xml | 2 +- sonar-maven-plugin/pom.xml | 2 +- sonar-maven3-plugin/pom.xml | 2 +- sonar-plugin-api/pom.xml | 2 +- sonar-server/pom.xml | 2 +- sonar-squid/pom.xml | 2 +- sonar-testing-harness/pom.xml | 2 +- sonar-ws-client/pom.xml | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) (limited to 'plugins/sonar-cpd-plugin') diff --git a/plugins/sonar-checkstyle-plugin/pom.xml b/plugins/sonar-checkstyle-plugin/pom.xml index 5c5e3151848..921c036b0a9 100644 --- a/plugins/sonar-checkstyle-plugin/pom.xml +++ b/plugins/sonar-checkstyle-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-cobertura-plugin/pom.xml b/plugins/sonar-cobertura-plugin/pom.xml index 30989f356e0..11a17ab31bc 100644 --- a/plugins/sonar-cobertura-plugin/pom.xml +++ b/plugins/sonar-cobertura-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-core-gwt/pom.xml b/plugins/sonar-core-gwt/pom.xml index c4982729f49..a2a15a3983a 100644 --- a/plugins/sonar-core-gwt/pom.xml +++ b/plugins/sonar-core-gwt/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. sonar-core-gwt diff --git a/plugins/sonar-core-plugin/pom.xml b/plugins/sonar-core-plugin/pom.xml index bcd7c0338fa..e2744796ccb 100644 --- a/plugins/sonar-core-plugin/pom.xml +++ b/plugins/sonar-core-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-cpd-plugin/pom.xml b/plugins/sonar-cpd-plugin/pom.xml index 2aea093aa65..67bf5eb3d85 100644 --- a/plugins/sonar-cpd-plugin/pom.xml +++ b/plugins/sonar-cpd-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-dbcleaner-plugin/pom.xml b/plugins/sonar-dbcleaner-plugin/pom.xml index 4127c46b710..666d1efb059 100644 --- a/plugins/sonar-dbcleaner-plugin/pom.xml +++ b/plugins/sonar-dbcleaner-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-design-plugin/pom.xml b/plugins/sonar-design-plugin/pom.xml index d29178317b1..d2de838c46e 100644 --- a/plugins/sonar-design-plugin/pom.xml +++ b/plugins/sonar-design-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-email-notifications-plugin/pom.xml b/plugins/sonar-email-notifications-plugin/pom.xml index 21a84565b24..fbfc9c7b2e4 100644 --- a/plugins/sonar-email-notifications-plugin/pom.xml +++ b/plugins/sonar-email-notifications-plugin/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. diff --git a/plugins/sonar-findbugs-plugin/pom.xml b/plugins/sonar-findbugs-plugin/pom.xml index 0e11db15bcc..c25e0164383 100644 --- a/plugins/sonar-findbugs-plugin/pom.xml +++ b/plugins/sonar-findbugs-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-jacoco-plugin/pom.xml b/plugins/sonar-jacoco-plugin/pom.xml index 5af7a22d3ad..8192d3fa288 100644 --- a/plugins/sonar-jacoco-plugin/pom.xml +++ b/plugins/sonar-jacoco-plugin/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. diff --git a/plugins/sonar-l10n-en-plugin/pom.xml b/plugins/sonar-l10n-en-plugin/pom.xml index 098927b9cb0..d29e3564782 100644 --- a/plugins/sonar-l10n-en-plugin/pom.xml +++ b/plugins/sonar-l10n-en-plugin/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. diff --git a/plugins/sonar-pmd-plugin/pom.xml b/plugins/sonar-pmd-plugin/pom.xml index 45e351a9aa9..9ef0e735d59 100644 --- a/plugins/sonar-pmd-plugin/pom.xml +++ b/plugins/sonar-pmd-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-squid-java-plugin/pom.xml b/plugins/sonar-squid-java-plugin/pom.xml index 220efb48ba1..3f9d3ccf0ce 100644 --- a/plugins/sonar-squid-java-plugin/pom.xml +++ b/plugins/sonar-squid-java-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. org.codehaus.sonar.plugins diff --git a/plugins/sonar-surefire-plugin/pom.xml b/plugins/sonar-surefire-plugin/pom.xml index 0845a611535..47042b18d7a 100644 --- a/plugins/sonar-surefire-plugin/pom.xml +++ b/plugins/sonar-surefire-plugin/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT ../.. diff --git a/pom.xml b/pom.xml index 4d4cc6c469d..3f07b53003f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar pom - 2.14-RC1 + 2.14-SNAPSHOT Sonar http://www.sonarsource.org Put technical debt under control diff --git a/sonar-application/pom.xml b/sonar-application/pom.xml index 6695630daca..c790fecd41e 100644 --- a/sonar-application/pom.xml +++ b/sonar-application/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-application jar diff --git a/sonar-batch-bootstrapper/pom.xml b/sonar-batch-bootstrapper/pom.xml index cc3e1987286..82d25ef8a34 100644 --- a/sonar-batch-bootstrapper/pom.xml +++ b/sonar-batch-bootstrapper/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-batch-bootstrapper diff --git a/sonar-batch-maven-compat/pom.xml b/sonar-batch-maven-compat/pom.xml index a394111eb8f..3fb1a74eb25 100644 --- a/sonar-batch-maven-compat/pom.xml +++ b/sonar-batch-maven-compat/pom.xml @@ -5,7 +5,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-batch-maven-compat diff --git a/sonar-batch/pom.xml b/sonar-batch/pom.xml index 7950297b156..04c4cb3c273 100644 --- a/sonar-batch/pom.xml +++ b/sonar-batch/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT org.codehaus.sonar diff --git a/sonar-channel/pom.xml b/sonar-channel/pom.xml index 610b47d423f..aa9a020055d 100644 --- a/sonar-channel/pom.xml +++ b/sonar-channel/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT .. sonar-channel diff --git a/sonar-check-api/pom.xml b/sonar-check-api/pom.xml index cb603051b80..305c99c03d7 100644 --- a/sonar-check-api/pom.xml +++ b/sonar-check-api/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT .. sonar-check-api diff --git a/sonar-colorizer/pom.xml b/sonar-colorizer/pom.xml index ac875423a91..0e5da362d76 100644 --- a/sonar-colorizer/pom.xml +++ b/sonar-colorizer/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT .. sonar-colorizer diff --git a/sonar-core/pom.xml b/sonar-core/pom.xml index 716d9d610cd..ae22d8350c2 100644 --- a/sonar-core/pom.xml +++ b/sonar-core/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-core Sonar :: Core diff --git a/sonar-deprecated/pom.xml b/sonar-deprecated/pom.xml index 7180f133b76..3d4ae8c5ba1 100644 --- a/sonar-deprecated/pom.xml +++ b/sonar-deprecated/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-deprecated Sonar :: Deprecated diff --git a/sonar-duplications/pom.xml b/sonar-duplications/pom.xml index b44a91d2ff1..89c770261a4 100644 --- a/sonar-duplications/pom.xml +++ b/sonar-duplications/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-duplications diff --git a/sonar-graph/pom.xml b/sonar-graph/pom.xml index 6e8e05db379..3c3924bf198 100644 --- a/sonar-graph/pom.xml +++ b/sonar-graph/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT .. org.codehaus.sonar diff --git a/sonar-gwt-api/pom.xml b/sonar-gwt-api/pom.xml index 4a0b5447657..b4f24a128c8 100644 --- a/sonar-gwt-api/pom.xml +++ b/sonar-gwt-api/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-gwt-api jar diff --git a/sonar-java-api/pom.xml b/sonar-java-api/pom.xml index b7fbe728bb5..469c3934f13 100644 --- a/sonar-java-api/pom.xml +++ b/sonar-java-api/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-java-api Sonar :: Java API diff --git a/sonar-markdown/pom.xml b/sonar-markdown/pom.xml index 4990000fcb7..e424c7717c0 100644 --- a/sonar-markdown/pom.xml +++ b/sonar-markdown/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT .. sonar-markdown diff --git a/sonar-maven-plugin/pom.xml b/sonar-maven-plugin/pom.xml index b49c4ae69f6..218c26b4f9d 100644 --- a/sonar-maven-plugin/pom.xml +++ b/sonar-maven-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-maven-plugin maven-plugin diff --git a/sonar-maven3-plugin/pom.xml b/sonar-maven3-plugin/pom.xml index ffbd80951d1..d1379bb5bd4 100644 --- a/sonar-maven3-plugin/pom.xml +++ b/sonar-maven3-plugin/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-maven3-plugin maven-plugin diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml index 148752d75e4..ebf0c875af0 100644 --- a/sonar-plugin-api/pom.xml +++ b/sonar-plugin-api/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-plugin-api jar diff --git a/sonar-server/pom.xml b/sonar-server/pom.xml index 15c8c55d037..c44a04b6182 100644 --- a/sonar-server/pom.xml +++ b/sonar-server/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-server war diff --git a/sonar-squid/pom.xml b/sonar-squid/pom.xml index 9d33ea1c649..222aa485eca 100644 --- a/sonar-squid/pom.xml +++ b/sonar-squid/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT .. org.codehaus.sonar diff --git a/sonar-testing-harness/pom.xml b/sonar-testing-harness/pom.xml index cb2124cd6fe..ee2ac4da23c 100644 --- a/sonar-testing-harness/pom.xml +++ b/sonar-testing-harness/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-testing-harness jar diff --git a/sonar-ws-client/pom.xml b/sonar-ws-client/pom.xml index b9ecc12a176..3287daaad88 100644 --- a/sonar-ws-client/pom.xml +++ b/sonar-ws-client/pom.xml @@ -4,7 +4,7 @@ org.codehaus.sonar sonar - 2.14-RC1 + 2.14-SNAPSHOT sonar-ws-client jar -- cgit v1.2.3 From fccfe2fab5ff9c8c0886e05dd0c7f4c8aabb27c8 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Fri, 2 Mar 2012 16:00:47 +0400 Subject: Minimum number of lines for duplication should depend on language --- .../org/sonar/plugins/cpd/SonarBridgeEngine.java | 20 +++++++++++- .../sonar/plugins/cpd/SonarBridgeEngineTest.java | 37 ++++++++++++++++++++++ .../duplications/internal/pmd/TokenizerBridge.java | 6 ++-- .../duplications/internal/pmd/PmdBridgeTest.java | 2 +- .../internal/pmd/TokenizerBridgeTest.java | 2 +- 5 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarBridgeEngineTest.java (limited to 'plugins/sonar-cpd-plugin') diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarBridgeEngine.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarBridgeEngine.java index afdd56837d0..7aee8b8ed4a 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarBridgeEngine.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarBridgeEngine.java @@ -19,6 +19,7 @@ */ package org.sonar.plugins.cpd; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import org.sonar.api.batch.CpdMapping; @@ -68,7 +69,7 @@ public class SonarBridgeEngine extends CpdEngine { // Create index SonarDuplicationsIndex index = indexFactory.create(project); - TokenizerBridge bridge = new TokenizerBridge(mapping.getTokenizer(), fileSystem.getSourceCharset().name()); + TokenizerBridge bridge = new TokenizerBridge(mapping.getTokenizer(), fileSystem.getSourceCharset().name(), getBlockSize(project)); for (InputFile inputFile : inputFiles) { Resource resource = mapping.createResource(inputFile.getFile(), fileSystem.getSourceDirs()); String resourceId = SonarEngine.getFullKey(project, resource); @@ -92,6 +93,23 @@ public class SonarBridgeEngine extends CpdEngine { } } + private static int getBlockSize(Project project) { + String languageKey = project.getLanguageKey(); + return project.getConfiguration() + .getInt("sonar.cpd." + languageKey + ".minimumLines", getDefaultBlockSize(languageKey)); + } + + @VisibleForTesting + static int getDefaultBlockSize(String languageKey) { + if ("cobol".equals(languageKey)) { + return 30; + } else if ("abap".equals(languageKey) || "natur".equals(languageKey)) { + return 20; + } else { + return 10; + } + } + private CpdMapping getMapping(Language language) { if (mappings != null) { for (CpdMapping cpdMapping : mappings) { diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarBridgeEngineTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarBridgeEngineTest.java new file mode 100644 index 00000000000..e9ae76e300f --- /dev/null +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarBridgeEngineTest.java @@ -0,0 +1,37 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2012 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Sonar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.plugins.cpd; + +import org.junit.Test; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +public class SonarBridgeEngineTest { + + @Test + public void shouldReturnDefaultBlockSize() { + assertThat(SonarBridgeEngine.getDefaultBlockSize("cobol"), is(30)); + assertThat(SonarBridgeEngine.getDefaultBlockSize("natur"), is(20)); + assertThat(SonarBridgeEngine.getDefaultBlockSize("abap"), is(20)); + assertThat(SonarBridgeEngine.getDefaultBlockSize("other"), is(10)); + } + +} diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java b/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java index 57e84688d76..7881ee60cfd 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/internal/pmd/TokenizerBridge.java @@ -37,16 +37,14 @@ import java.util.List; */ public class TokenizerBridge { - private static final int BLOCK_SIZE = 10; - private final Tokenizer tokenizer; private final String encoding; private final PmdBlockChunker blockBuilder; - public TokenizerBridge(Tokenizer tokenizer, String encoding) { + public TokenizerBridge(Tokenizer tokenizer, String encoding, int blockSize) { this.tokenizer = tokenizer; this.encoding = encoding; - this.blockBuilder = new PmdBlockChunker(BLOCK_SIZE); + this.blockBuilder = new PmdBlockChunker(blockSize); } // TODO remove from here diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java index 60c22a51f85..54210b9c237 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/PmdBridgeTest.java @@ -44,7 +44,7 @@ public class PmdBridgeTest { @Before public void setUp() { index = new PackedMemoryCloneIndex(); - bridge = new TokenizerBridge(new JavaTokenizer(), "UTF-8"); + bridge = new TokenizerBridge(new JavaTokenizer(), "UTF-8", 10); } @Test diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java index ec2bd5d0d9b..41a78275377 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/internal/pmd/TokenizerBridgeTest.java @@ -49,7 +49,7 @@ public class TokenizerBridgeTest { tokenEntries.add(TokenEntry.getEOF()); } }; - bridge = new TokenizerBridge(tokenizer, "UTF-8"); + bridge = new TokenizerBridge(tokenizer, "UTF-8", 10); } @Test -- cgit v1.2.3