Showing 9,050 of 9,050 total issues
Method validate
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
static boolean validate(final String[] args) {
final JsonObject input = Ut.valueJObject(SlConfig.validate().getJsonObject(YmlCore.shell.validate.INPUT));
/*
* 1. required arguments for complex shell building
*/
- 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 saveEntity
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
<T> Set<T> saveEntity(final JsonArray data, final ExTable table) {
final Set<T> resultSet = new HashSet<>();
if (Objects.nonNull(table.classPojo()) && Objects.nonNull(table.classDao())) {
try {
final JsonObject filters = table.whereAncient(data);
- 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 equals
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == 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 field
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
static Kv<String, String> field(final Object value) {
if (KWeb.ARGS.V_HOLDER.equals(value)) {
return null;
}
final String field;
- 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 searchInternal
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private <T> List<T> searchInternal(final DSLContext context, final Ir qr) {
// Started steps
final SelectWhereStep started = context.selectFrom(this.analyzer.table());
// Condition set
SelectConditionStep conditionStep = null;
Method attributes
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
static JsonArray attributes(final String key) {
final JsonArray columns = getColumn(key);
if (Ut.isNotNil(columns)) {
/*
* column transfer to
Method toJson
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default io.vertx.core.json.JsonObject toJson() {
io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
json.put("KEY",getKey());
json.put("NAME",getName());
Method checkFieldType
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public CheckResult checkFieldType(final MField field, final ConcurrentMap<String, Object> columnDetail) {
if (null == columnDetail) {
return CheckResult.FAILED;
}
Method from
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void from(IPBuyOrder from) {
setKey(from.getKey());
setSerial(from.getSerial());
setType(from.getType());
Method from
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void from(IPBuyOrder from) {
setKey(from.getKey());
setSerial(from.getSerial());
setType(from.getType());
Method toJson
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public default io.vertx.core.json.JsonObject toJson() {
io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
json.put("KEY",getKey());
json.put("SERIAL",getSerial());
Method getSerializedSize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public int getSerializedSize() {
int size = this.memoizedSize;
if (size != -1) {
return size;
Similar blocks of code found in 3 locations. Consider refactoring. Open
package io.vertx.mod.rbac.authorization.child;
import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.Amalgam;
import io.vertx.mod.rbac.authorization.Assembler;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
package io.vertx.mod.rbac.authorization.direct;
import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.Amalgam;
import io.vertx.mod.rbac.authorization.Assembler;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
package io.vertx.mod.rbac.authorization.parent;
import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.Amalgam;
import io.vertx.mod.rbac.authorization.Assembler;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 103.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method vT
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
static <T> T vT(final String literal, final Class<?> type) {
if (TIs.isNil(literal)) {
return null;
}
Method valueToJson
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
static void valueToJson(final ClusterSerializable json, final String field) {
if (json instanceof JsonArray) {
// Fix: 11
final JsonArray array = (JsonArray) json;
HIter.itJArray(array).forEach(item -> valueToJson(item, field));
Method read
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
static InputStream read(final String filename,
final Class<?> clazz) {
final String root = IoPath.root();
LOG.io(INFO.IoStream.__FILE_ROOT, root, filename);
/*
Method equals
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
Method procColumn
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private JsonObject procColumn(final UiColumn column) {
final JsonObject columnJson = new JsonObject();
columnJson.put("title", column.getTitle());
columnJson.put("dataIndex", column.getDataIndex());
/*