Showing 52 of 78 total issues
Method transform
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
private Map<String, Object> transform(final int depth,
final Map<String, Object> input,
final String previousPath,
final List<PathElement> pathElements,
final Transformation transformation)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method transform
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Map<String, Object> transform(final int depth,
final Map<String, Object> input,
final String previousPath,
final List<PathElement> pathElements,
final Transformation transformation)
Method perform
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method perform
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
Method perform
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method perform
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
Method perform
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method perform
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
Method perform
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setupRunStateForKeysAndValue
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Given("^TestingInternalSteps I have setup the run state for keys and type:$")
@SuppressFBWarnings(value = "CC_CYCLOMATIC_COMPLEXITY", justification = "Complex because of framework used")
public void setupRunStateForKeysAndValue(final DataTable data)
throws IllegalKeyException {
Method perform
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
Method doCastTo
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressFBWarnings(value = {"CC_CYCLOMATIC_COMPLEXITY",
"URV_CHANGE_RETURN_TYPE"}, justification = "As designed")
private Object doCastTo(final String value, final String type)
throws UnsupportedDataTypeConversionException,
UnsupportedDataTypeException {
Method checkSplit
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private PathElement checkSplit(final String path, final String split)
throws InvalidPathException {
LOGGER.debug("path='{}' split='{}'", path, split);
Method perform
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public Map<String, Object> perform(final PathElement pathElement,
final Map<String, Object> inputRaw,
final String currentPath)
throws IllegalKeyException,
Method parsePath
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public List<PathElement> parsePath(final String path)
throws InvalidPathException {
LOGGER.debug("parsePath.entry path='{}'", path);
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void convertMapToJson(final RunState runState,
final String runStateJsonMapKey,
final String runStateJsonStringKey)
throws IllegalKeyException,
IllegalTypeClassException,
- 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 86.
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
public void convertObjectToMap(final RunState runState,
final String runStateObjectKey,
final String runStateJsonMapKey)
throws IllegalKeyException,
IllegalTypeClassException,
- 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 86.
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
Method verify
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void verify(final RunState runState)
throws NullRunStateException {
if (isNull(runState)) {
Similar blocks of code found in 5 locations. Consider refactoring. Open
@Given("TestingInternalSteps I convert object using RunStateKey {string}, to json map using RunStateKey {string} produces the AssertionError {string}")
public void convertObjectToMap_AssertionError(final String runStateObjectKey,
final String runStateJsonMapKey,
final String expectedExceptionMessageRaw) {
- 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 82.
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 5 locations. Consider refactoring. Open
@Given("TestingInternalSteps I convert json map using RunStateKey {string}, to json string using RunStateKey {string} produces the AssertionError {string}")
public void convertMapToJson_AssertionError(final String runStateJsonMapKey,
final String runStateJsonStringKey,
final String expectedExceptionMessageRaw) {
- 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 82.
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