Method
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class Method extends GraphMember {
public static final String PROPERTY_RETURNTYPE = "returnType";
public static final String PROPERTY_PARAMETER = "parameter";
public static final String PROPERTY_PARAMETERNAME = "parameterName";
public static final String PROPERTY_NODE = "node";
Method getParameterString
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
CharacterBuffer getParameterString(boolean shortName, boolean removeParameterNames, boolean optimizeArray) {
CharacterBuffer sb = new CharacterBuffer().with("(");
GraphSimpleSet collection = this.getChildren();
for (int i = 0; i < collection.size(); i++) {
if ((collection.get(i) instanceof Parameter) == 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 with
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Method with(Annotation value) {
if (this.children != null) {
if (this.children instanceof Annotation) {
this.children = null;
} else if (this.children instanceof GraphSimpleSet) {
- 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 getParameters
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public ParameterSet getParameters(Condition<?>... filters) {
ParameterSet collection = new ParameterSet();
if (children == null) {
return collection;
}
- 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 getParameterString
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
CharacterBuffer getParameterString(boolean shortName, boolean removeParameterNames, boolean optimizeArray) {
CharacterBuffer sb = new CharacterBuffer().with("(");
GraphSimpleSet collection = this.getChildren();
for (int i = 0; i < collection.size(); i++) {
if ((collection.get(i) instanceof Parameter) == false) {
Method getThrows
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public SimpleSet<Throws> getThrows() {
SimpleSet<Throws> collection = new SimpleSet<Throws>();
if (children == null) {
return collection;
}
- 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 getValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Object getValue(String attribute) {
if (PROPERTY_RETURNTYPE.equalsIgnoreCase(attribute)) {
return this.getReturnType();
}
- 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 isValidReturn
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public boolean isValidReturn() {
if (getReturnType() == null || DataType.VOID.equals(getReturnType())) {
return true;
}
if (this.body == 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
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return this.getNodes();
Avoid too many return
statements within this method. Open
return super.getValue(attribute);
Avoid too many return
statements within this method. Open
return this.getBody();