Method execute
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public Object execute(Entity updateMessage, Filter filter) {
if (updateMessage.has(SendableEntityCreator.UPDATE) == false && updateMessage.has(SendableEntityCreator.REMOVE) == false) {
return null;
}
if (this.map == null) {
- 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 change
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public boolean change(String property, SendableEntityCreator creator, Entity change, Object oldValue,
Object newValue) {
boolean done = false;
if (creator == 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
File UpdateListener.java
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
package de.uniks.networkparser;
/*
NetworkParser
The MIT License
Method change
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean change(String property, SendableEntityCreator creator, Entity change, Object oldValue,
Object newValue) {
boolean done = false;
if (creator == null) {
return false;
Method execute
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Object execute(Entity updateMessage, Filter filter) {
if (updateMessage.has(SendableEntityCreator.UPDATE) == false && updateMessage.has(SendableEntityCreator.REMOVE) == false) {
return null;
}
if (this.map == null) {
Method propertyChange
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt == null) {
return;
}
- 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 propertyChange
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt == null) {
return;
}
Method executePatch
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Object executePatch(String op, String path, Entity updateMessage) {
if (root == null || path == null) {
return null;
}
if (root instanceof Entity) {
- 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 setValue
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private Object setValue(SendableEntityCreator creator, Object element, String key, Object newValue, String typ) {
if (newValue instanceof Entity) {
Entity json = (Entity) newValue;
Object value = this.map.decode(json);
if (value != null) {
- 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 update
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean update(Object value) {
if (value instanceof SimpleEvent == false || condition == 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
Method change
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public Entity change(String property, Object source, SendableEntityCreator creatorClass, Object oldValue,
Object newValue) {
Method setValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private Object setValue(SendableEntityCreator creator, Object element, String key, Object newValue, String typ) {
Method change
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public boolean change(String property, SendableEntityCreator creator, Entity change, Object oldValue,
Object newValue) {
Method getElement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Entity getElement(String path, Entity element, Entity parent) {
if (path == null) {
return null;
}
int pos = path.indexOf("/");
- 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 null;
Avoid too many return
statements within this method. Open
return setValue(creator, masterObj, key, update.getValue(key), SendableEntityCreator.NEW);
Avoid too many return
statements within this method. Open
return setValue(creator, masterObj, key, item.getValue(), SendableEntityCreator.NEW);
Avoid too many return
statements within this method. Open
return masterObj;
Avoid too many return
statements within this method. Open
return masterObj;
Avoid too many return
statements within this method. Open
return setValue(creator, masterObj, key, item.getValue(), SendableEntityCreator.NEW);
Avoid too many return
statements within this method. Open
return;