Method diffModel
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
public GraphPatternMatch diffModel(Object master, Object slave, MapEntity map) {
if (map == null || map.add(master) == false) {
return null;
}
GraphPatternMatch result = new GraphPatternMatch();
- 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 diffModel
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GraphPatternMatch diffModel(Object master, Object slave, MapEntity map) {
if (map == null || map.add(master) == false) {
return null;
}
GraphPatternMatch result = new GraphPatternMatch();
Method parse
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private Clazz parse(Object object, MapEntity map, GraphList list, int deep) {
if (object == null) {
return 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
File GraphTokener.java
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
package de.uniks.networkparser.graph;
/*
NetworkParser
The MIT License
Method highlightModel
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public GraphList highlightModel(GraphList clazzDiagram, GraphList objectDiagram) {
if (clazzDiagram == null || objectDiagram == null) {
return clazzDiagram;
}
HashMap<String, Association> edges = new HashMap<String, Association>();
Method parse
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Clazz parse(Object object, MapEntity map, GraphList list, int deep) {
if (object == null) {
return null;
}
Method highlightModel
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public GraphList highlightModel(GraphList clazzDiagram, GraphList objectDiagram) {
if (clazzDiagram == null || objectDiagram == null) {
return clazzDiagram;
}
HashMap<String, Association> edges = new HashMap<String, Association>();
- 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 parsePropertyValue
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void parsePropertyValue(Object entity, MapEntity map, GraphList list, int deep, Clazz element,
String property, Object item, int cardinality) {
if (item == null) {
return;
}
Method parsePropertyValue
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
private void parsePropertyValue(Object entity, MapEntity map, GraphList list, int deep, Clazz element,
String property, Object item, int cardinality) {
Avoid deeply nested control flow statements. Open
for (Iterator<?> childIterator = child.iterator(); childIterator.hasNext();) {
match.with(GraphPatternChange.createCreate(childIterator.next()));
}
Avoid deeply nested control flow statements. Open
if (match.size() > 0) {
result.with(match);
}
Avoid deeply nested control flow statements. Open
for (Iterator<?> childIterator = masterCollection.iterator(); childIterator.hasNext();) {
match.with(GraphPatternChange.createDelete(childIterator.next()));
}
Avoid too many return
statements within this method. Open
return result;
Avoid too many return
statements within this method. Open
return result;
Avoid too many return
statements within this method. Open
return result;