FluentLenium/FluentLenium

View on GitHub

Showing 563 of 1,951 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

package io.fluentlenium.adapter.testng.integration;

import io.fluentlenium.adapter.testng.integration.localtest.IntegrationFluentTestNg;
import io.fluentlenium.core.FluentPage;
import io.fluentlenium.core.annotation.Page;
fluentlenium-spring-testng/src/test/java/io/fluentlenium/CyclicDependencyTest.java on lines 1..82

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 131.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

package io.fluentlenium.adapter.cucumber.integration.tests.cucumber.api.nodriver.steps;

import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
fluentlenium-cucumber/src/test/java/io/fluentlenium/adapter/cucumber/integration/tests/io/cucumber/nodriver/steps/NoDriverSteps.java on lines 1..79

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

package io.fluentlenium.adapter.cucumber.integration.tests.io.cucumber.nodriver.steps;

import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
fluentlenium-cucumber/src/test/java/io/fluentlenium/adapter/cucumber/integration/tests/cucumber/api/nodriver/steps/NoDriverSteps.java on lines 1..79

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    @Test
    public void testClick() {
        when(element2.conditions().clickable()).thenReturn(true);
        when(element3.conditions().clickable()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 172..190
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 192..210

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 127.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    @Test
    public void testDoubleClick() {
        when(element2.conditions().clickable()).thenReturn(true);
        when(element3.conditions().clickable()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 152..170
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 192..210

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 127.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    @Test
    public void testContextClick() {
        when(element2.conditions().clickable()).thenReturn(true);
        when(element3.conditions().clickable()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 152..170
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 172..190

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 127.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testSubmit() {
        when(element2.enabled()).thenReturn(true);
        when(element3.enabled()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 252..270
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 272..290
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 292..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testClearAllReactInputs() {
        when(element2.enabled()).thenReturn(true);
        when(element3.enabled()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 232..250
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 252..270
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 272..290

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void shouldDoClear() {
        when(element2.enabled()).thenReturn(true);
        when(element3.enabled()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 232..250
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 272..290
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 292..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testClearAll() {
        when(element2.enabled()).thenReturn(true);
        when(element3.enabled()).thenReturn(true);

fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 232..250
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 252..270
fluentlenium-core/src/test/java/io/fluentlenium/core/domain/FluentListImplTest.java on lines 292..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @Test
    public void isPresent() {
        FluentListConditions matcher = wait.untilEach(fluentWebElements);
        assertThatThrownBy(matcher::present).isExactlyInstanceOf(TimeoutException.class);

fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitElementListMatcherTest.java on lines 263..278

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @Test
    public void isPresent() {
        FluentListConditions matcher = wait.until(fluentWebElements);
        assertThatThrownBy(matcher::present).isExactlyInstanceOf(TimeoutException.class);

fluentlenium-core/src/test/java/io/fluentlenium/core/wait/FluentWaitEachElementMatcherTest.java on lines 256..271

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testParse() {
        UrlTemplate urlParametersTemplate = new UrlTemplate("/abc/{param1}/def/{param2}/{param3}");
        assertThat(getParameterNames(urlParametersTemplate)).containsExactly("param1", "param2", "param3");
        assertThat(getParameterOptionals(urlParametersTemplate)).containsExactly(false, false, false);
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 95..106
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 184..195
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 230..241

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 115.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testParseParametersFromPathAndQueryParameters() {
        UrlTemplate urlParametersTemplate = new UrlTemplate("/abc/{param1}?param2={param2}&param3={param3}");
        assertThat(getParameterNames(urlParametersTemplate)).containsExactly("param1", "param2", "param3");
        assertThat(getParameterOptionals(urlParametersTemplate)).containsExactly(false, false, false);
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 82..93
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 95..106
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 230..241

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 115.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testParseWithEndingSlash() {
        UrlTemplate urlParametersTemplate = new UrlTemplate("/abc/{param1}/def/{param2}/{param3}/");
        assertThat(getParameterNames(urlParametersTemplate)).containsExactly("param1", "param2", "param3");
        assertThat(getParameterOptionals(urlParametersTemplate)).containsExactly(false, false, false);
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 82..93
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 184..195
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 230..241

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 115.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testParseMatchingWithTrailingSlash() {
        UrlTemplate urlParametersTemplate = new UrlTemplate("/abc/{param1}/def/{param2}{?/param3}");
        assertThat(getParameterNames(urlParametersTemplate)).containsExactly("param1", "param2", "param3");
        assertThat(getParameterOptionals(urlParametersTemplate)).containsExactly(false, false, true);
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 82..93
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 95..106
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 184..195

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 115.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

package io.fluentlenium.core.filter.matcher;

import org.junit.Test;

import java.util.regex.Pattern;
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/ContainsMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/EndsWithMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/EqualMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/NotEndsWithMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/NotStartsWithMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/StartsWithMatcherTest.java on lines 1..41

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

package io.fluentlenium.core.filter.matcher;

import org.junit.Test;

import java.util.regex.Pattern;
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/ContainsMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/EndsWithMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/NotContainsMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/NotEndsWithMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/NotStartsWithMatcherTest.java on lines 1..41
fluentlenium-core/src/test/java/io/fluentlenium/core/filter/matcher/StartsWithMatcherTest.java on lines 1..41

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testParseOptionalPathMiddleParameter() {
        UrlTemplate urlParametersTemplate = new UrlTemplate("/abc/{param1}{?/def/param2}{/ghi/param3}");
        assertThat(getParameterNames(urlParametersTemplate)).containsExactly("param1", "param2", "param3");
        assertThat(getParameterOptionals(urlParametersTemplate)).containsExactly(false, true, false);
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 119..130
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 132..143
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 145..156

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    @Test
    public void testParseOptionalPathParameter() {
        UrlTemplate urlParametersTemplate = new UrlTemplate("/abc/{param1}{?/def/param2}{?/param3}");
        assertThat(getParameterNames(urlParametersTemplate)).containsExactly("param1", "param2", "param3");
        assertThat(getParameterOptionals(urlParametersTemplate)).containsExactly(false, true, true);
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 119..130
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 145..156
fluentlenium-core/src/test/java/io/fluentlenium/core/url/UrlTemplateTest.java on lines 158..169

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 111.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language