Showing 7,269 of 9,050 total issues
Method bugAt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static void bugAt(final boolean condition, final HLogger logger,
final ProgramActuator trueActuator, final ProgramActuator falseActuator) throws ProgramException {
if (condition) {
bugAt(trueActuator, logger);
} 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 recordServer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void recordServer(final HttpServerOptions options,
final Router router) {
final Integer port = options.getPort();
final AtomicInteger out = ZeroOption.ATOMIC_LOG.get(port);
if (VValue.ZERO == out.getAndIncrement()) {
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (this == o) {
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 type
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Class<?> type(final String field, final String childField) {
final HMetaField item = this.shape.getOrDefault(field, null);
if (Objects.isNull(item)) {
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
Method fromJson
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static void fromJson(final JsonObject json, final RpcOptions obj) {
if (json.getValue(KName.NAME) instanceof String) {
obj.setName(json.getString(KName.NAME));
}
if (json.getValue(KName.CONFIG) instanceof JsonObject) {
- 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 push
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Iterable<PushResult> push(final Git git, final boolean force) {
try {
final Repository repository = git.getRepository();
final Set<String> remotes = repository.getRemoteNames();
- 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 outBoolean
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static void outBoolean(final Cell cell, final Object value) {
final String literal = value.toString();
if ("true".equalsIgnoreCase(literal) || "false".equalsIgnoreCase(literal)) {
/*
* Standard Processing
- 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 createCell
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static void createCell(final Sheet sheet, final Row row,
final ExPos pos, final Object value, final Class<?> type) {
if (value instanceof JsonObject) {
/*
* Json Format
- 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 executeAsync
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Future<JsonObject> executeAsync(final JsonObject input) {
final JsonObject normalized = new JsonObject();
/*
* query processing
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (this == o) {
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 attachConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private Future<JsonObject> attachConfig(final JsonObject formJson) {
final JsonObject config = new JsonObject();
Ut.valueToJObject(formJson, KName.METADATA);
/*
* Form configuration
- 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 instance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static Register instance(final JsonObject params) {
if (params.containsKey(KName.RECORD)) {
final Object record = params.getValue(KName.RECORD);
if (record instanceof JsonObject) {
// Json Processing
- 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 analyze
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Address(Addr.GRAPH_ANALYZE)
public Future<JsonObject> analyze(final String key, final String graph, final Integer level) {
final String graphName = Ut.isNil(graph) ? KWeb.DEPLOY.VERTX_GROUP : graph;
if (Ut.isNil(key)) {
return Ux.future(new JsonObject());
- 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 attack
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Handler<RoutingContext> attack(final JtUri uri) {
/*
* 「The lifecycle of starting」
* 1. IN_RULE Specification
- 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 aclProjection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static JsonArray aclProjection(final JsonArray original, final Acl acl,
final Predicate<Acl> predicate) {
final JsonArray projection = Ut.valueJArray(original);
if (Objects.isNull(acl)) {
/*
- 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 source
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public ConcurrentMap<String, JsonArray> source(final JsonObject definition) {
final JsonObject sourceDictJson = definition.getJsonObject(KName.SOURCE_DICT);
final ConcurrentMap<String, JsonArray> sourceData = new ConcurrentHashMap<>();
if (Ut.isNotNil(sourceDictJson)) {
/*
- 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 ark
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static HArk ark(final MultiMap headers) {
/* 1. X-App-Id 检索 */
final String appId = headers.get(KWeb.HEADER.X_APP_ID);
if (Ut.isNotNil(appId)) {
return ark(appId);
- 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 switchAsync
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public Future<Arrow> switchAsync(final JsonObject data, final Supplier<Arrow> supplier) {
if (this.dynamic) {
if (Objects.isNull(this.switcher)) {
// Switcher is not configured
return Ux.future(this.arrow(supplier, this.atom, this.dao));
- 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 initializeMatrix
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private KMarkAttribute initializeMatrix(final MAttribute attribute) {
final StringBuilder literal = new StringBuilder();
// Boolean -> 0, 1
final List<Boolean> values = new ArrayList<>();
values.add(attribute.getActive());
- 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 toCount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static Long toCount(final Result<Record> result) {
if (Objects.isNull(result) || result.isEmpty()) {
return 0L;
} else {
final Record record = result.get(VValue.IDX);
- 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"