Showing 109 of 168 total issues
Method visit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void visit(final MethodDeclaration methodDeclaration, final EncapsulationReport report) {
super.visit(methodDeclaration, report);
ClassOrInterfaceDeclaration parentClass = JavaParserUtil.getClass(methodDeclaration.getParentNode().get());
- 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 resolveExtClazz
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void resolveExtClazz() {
ResolvableType baseRouterClazz = ResolvableType.forClass(this.baseRouterClazz).getSuperType();
for (int i = 0; i < MAX_INHERITANCE_DEPTH; i++) {
for (ResolvableType resolvableType : baseRouterClazz.getGenerics()) {
if (IDomainExtension.class.isAssignableFrom(resolvableType.resolve())) {
- 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 hasProducer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean hasProducer(KeyEventEntry entry) {
if (getKeyModelReport().hasProducer(entry)) {
return true;
}
- 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 visit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void visit(final ClassOrInterfaceDeclaration classDeclaration, final KeyRelationReport report) {
super.visit(classDeclaration, report);
if (!classDeclaration.isAnnotationPresent(KeyRelation.class)) {
- 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 fixPackage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void fixPackage(String fromPkg, String toPkg) {
if (!fromPkg.contains(".")) {
// fix a single entity pkg
String keyModelName = fromPkg;
KeyModelEntry entry = data.get(keyModelName);
- 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 resolveStepExType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private Class resolveStepExType() {
Class thisClass;
if (AopUtils.isAopProxy(this)) {
thisClass = AopUtils.getTargetClass(this);
} else {
- 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 producedEvents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public Set<String> producedEvents() {
Set<String> result = new TreeSet<>();
for (KeyBehaviorEntry entry : keyBehaviorEntries) {
if (entry.produceEvent()) {
result.addAll(entry.getEvents());
- 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 writeClazzDefinition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void writeClazzDefinition(AggregateEntry aggregateEntry, KeyModelEntry keyModelEntry) throws SQLException, ClassNotFoundException {
List<String> sqlList = new LinkedList<>();
for (KeyElement.Type type : keyModelEntry.types()) {
for (KeyPropertyEntry propertyEntry : keyModelEntry.keyPropertiesByType(type)) {
sqlList.add(String.format(EntityInsert,
- 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 containsNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean containsNode(@NonNull String clazzName) {
for (Record node : callerRecords()) {
if (node.sameAs(clazzName)) {
return true;
}
- 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"