Showing 1,951 of 1,951 total issues
Similar blocks of code found in 6 locations. Consider refactoring. Open
package io.fluentlenium.it;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
- Read upRead up
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 299.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
package io.fluentlenium.it;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
- Read upRead up
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 299.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File FluentLeniumFunctionalWaitTest.java
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
package io.fluentlenium.test.await;
import io.fluentlenium.core.filter.FilterConstructor;
import io.fluentlenium.core.filter.MatcherConstructor;
import io.fluentlenium.test.IntegrationFluentTest;
PropertiesBackendConfigurationTest
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
@RunWith(MockitoJUnitRunner.class)
public class PropertiesBackendConfigurationTest {
private static final String DRIVER_LIFECYCLE = "driverLifecycle";
@Mock
Similar blocks of code found in 2 locations. Consider refactoring. Open
package io.fluentlenium.core.events;
import io.fluentlenium.utils.ReflectionUtils;
import org.openqa.selenium.WebDriver;
- Read upRead up
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 256.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
package io.fluentlenium.core.events;
import io.fluentlenium.utils.ReflectionUtils;
import org.openqa.selenium.WebDriver;
- Read upRead up
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 256.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File FluentWebElementTest.java
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
package io.fluentlenium.core.domain;
import io.fluentlenium.adapter.FluentAdapter;
import io.fluentlenium.core.components.ComponentException;
import io.fluentlenium.core.components.ComponentsManager;
FluentWaitElementListTest
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
@RunWith(MockitoJUnitRunner.class)
public class FluentWaitElementListTest {
@Mock
private FluentWait fluentControlWait;
PropertiesBackendConfiguration
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings("PMD.GodClass")
public class PropertiesBackendConfiguration extends BaseConfiguration implements ConfigurationProperties {
/**
* Default properties prefix.
*/
FluentList
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
public interface FluentList<E extends FluentWebElement>
extends List<E>, FluentActions<FluentList<E>, E>, FluentProxyState<FluentList<E>>, SearchControl<E>,
HookControl<FluentList<E>>, FluentLabel<FluentList<E>> {
/**
File FluentWaitEachElementMatcherTest.java
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
package io.fluentlenium.core.wait;
import io.fluentlenium.core.FluentDriver;
import io.fluentlenium.core.conditions.FluentListConditions;
import io.fluentlenium.core.conditions.WebElementConditions;
File FluentWaitElementListMatcherTest.java
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
package io.fluentlenium.core.wait;
import io.fluentlenium.core.FluentDriver;
import io.fluentlenium.core.conditions.FluentListConditions;
import io.fluentlenium.core.conditions.WebElementConditions;
Similar blocks of code found in 2 locations. Consider refactoring. Open
static void assertConditions(IntegerConditions conditions, int value) { // NOPMD CommentDefaultAccessModifier
assertThat(conditions.verify(input -> input == value)).isTrue();
assertThat(conditions.equalTo(value - 1)).isFalse();
assertThat(conditions.equalTo(value)).isTrue();
- Read upRead up
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 245.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
static void assertNotConditions(IntegerConditions conditions, int value) { // NOPMD CommentDefaultAccessModifier
assertThat(conditions.verify(input -> input == value)).isFalse();
assertThat(conditions.equalTo(value - 1)).isTrue();
assertThat(conditions.equalTo(value)).isFalse();
- Read upRead up
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 245.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Test
public void getOrCreateDriverWithDifferentTestClassesCreatesDistinctInstances() {
SharedMutator.EffectiveParameters<?> parameters1 = new SharedMutator.EffectiveParameters<>(Object.class, "test", DriverLifecycle.METHOD);
SharedMutator.EffectiveParameters<?> parameters2 = new SharedMutator.EffectiveParameters<>(String.class, "test", DriverLifecycle.METHOD);
SharedWebDriver driver = container.getOrCreateDriver(this, parameters1);
- Read upRead up
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 243.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Test
public void getOrCreateDriverWithDifferentTestNamesAndDifferentTestClassAndStrategyPerClassCreatesDistinctInstance() {
SharedMutator.EffectiveParameters<?> parameters1 = new SharedMutator.EffectiveParameters<>(Object.class, "test", DriverLifecycle.CLASS);
SharedMutator.EffectiveParameters<?> parameters2 = new SharedMutator.EffectiveParameters<>(String.class, "otherTest", DriverLifecycle.CLASS);
SharedWebDriver driver = container.getOrCreateDriver(this, parameters1);
- Read upRead up
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 243.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
ProxiesTest
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
@RunWith(MockitoJUnitRunner.class)
public class ProxiesTest {
@Mock
private WebDriver driver;
FluentWaitElementTest
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
@RunWith(MockitoJUnitRunner.class)
public class FluentWaitElementTest {
@Mock
private FluentWait fluentControlWait;
AnnotationConfiguration
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
public class AnnotationConfiguration extends BaseConfiguration implements ConfigurationProperties {
private final FluentConfiguration configuration;
private final Map<String, String> customProperties = new HashMap<>();
AnnotationConfigurationTest
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class AnnotationConfigurationTest {
private static AnnotationConfiguration configuration;
private static AnnotationConfiguration defaultConfiguration;
private static AnnotationConfiguration noConfiguration;
private static AnnotationConfiguration desiredCapabilitiesConfiguration;