File Pattern.java
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
package de.uniks.networkparser.graph;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
Method finding
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private boolean finding(boolean save) {
/* Backwards */
if (findCondition(null) == false) {
/* Not found */
- 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
Pattern
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public class Pattern implements Iterator<Object>, Iterable<Object>, ObjectCondition {
public static final String MODIFIER_SEARCH = "search";
public static final String MODIFIER_CHANGE = "change";
public static final String MODIFIER_ADD = "add";
public static final String MODIFIER_REMOVE = "remove";
Method appling
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public boolean appling() {
if (condition instanceof PatternCondition == false) {
return false;
}
PatternCondition patternCondition = (PatternCondition) condition;
- 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 findCondition
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private boolean findCondition(String modifier) {
if(condition == null) {
return false;
}
if(condition instanceof Pattern) {
- 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 appling
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean appling() {
if (condition instanceof PatternCondition == false) {
return false;
}
PatternCondition patternCondition = (PatternCondition) condition;
Method finding
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
private boolean finding(boolean save) {
/* Backwards */
if (findCondition(null) == false) {
/* Not found */
Method update
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public boolean update(Object value) {
if(value == null) {
return false;
}
Method update
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean update(Object value) {
if(value == null) {
return false;
}
- 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
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;