Showing 9,050 of 9,050 total issues
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || this.getClass() != o.getClass()) return false;
final Against against = (Against) o;
- 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 bugOr
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static <T> T bugOr(final boolean condition, final HLogger logger,
final ProgramSupplier<T> trueSupplier, final ProgramSupplier<T> falseSupplier) throws ProgramException {
if (condition) {
return Objects.nonNull(trueSupplier) ?
HSupplier.bugOr(null, trueSupplier, logger) : 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 findOne
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Future<JsonObject> findOne(final String collection, final JsonObject filter,
final String joinedCollection, final String joinedKey, final JsonObject additional,
final BinaryOperator<JsonObject> operatorFun) {
Method flag
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static ChangeFlag flag(final JsonObject recordN, final JsonObject recordO) {
if (HUt.isNil(recordO)) {
if (HUt.isNil(recordN)) {
return ChangeFlag.NONE;
} 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 isMatch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static boolean isMatch(final Method method, final String name, final Class<?>[] arguments) {
if (!name.equals(method.getName())) {
// Name not match
return 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 get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("all")
static ExValue get(final Object value) {
if (Objects.isNull(value)) {
return Ut.singleton(PureValue.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 readDirect
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static JsonObject readDirect(final String filename) {
// Fix Docker issue
final ConcurrentMap<String, JsonObject> dataRef = CC_STORAGE.store();
if (dataRef.containsKey(filename)) {
return dataRef.get(filename);
- 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 valueJObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static JsonObject valueJObject(final JsonObject input, final String field, final boolean isCopy) {
if (TIs.isNil(field) || TIs.isNil(input)) {
return new JsonObject();
}
final Object value = input.getValue(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 run
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void run(final String[] args) {
/*
* Arguments process
*/
if (Sl.ready(args)) {
- 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 extractDynamic
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private Future<JsonArray> extractDynamic(final JsonArray dataArray, final String name) {
/* Source Processing */
if (Objects.isNull(this.tenant)) {
return Ux.future(dataArray);
} 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 deserializeSmart
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static <T> String deserializeSmart(final String literal, final Class<T> type) {
if (HUt.isJObject(literal) || HUt.isJArray(literal)) {
if (HUt.isJArray(literal)) {
return deserializeSmart(new JsonArray(literal), type);
} 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 envDatabase
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static JsonObject envDatabase(final JsonObject database, final EmDS.Stored mode) {
final AttrSet set;
if (EmDS.Stored.WORKFLOW == mode) {
// Workflow
set = envDatabase(DBW_HOST, DBW_PORT, DBW_INSTANCE);
- 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 marker
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static JsonObject marker(final JsonObject node) {
/*
* 1. name does not existing
*/
final JsonObject replaced = node.copy();
- 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 toPath
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static String toPath(final HArk ark,
final Supplier<String> uriSupplier,
final boolean secure, // Null Pointer if use Boolean
final JtConfig config) {
/* Whether current api is secure */
- 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 mount
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("all")
public void mount(final Router router, final JsonObject config) {
// MONITOR
this.monitor.agentConfig(config);
- 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 bind
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static Consumer<JsonObject> bind(final ProfileType type,
final List<ProfileRole> profiles,
final boolean highPriority) {
return input -> {
if (Objects.nonNull(input) && !profiles.isEmpty()) {
- 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 isValid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private boolean isValid(final HttpServerRequest request) {
final JsonArray include = this.config.getJsonArray("include");
if (Objects.isNull(include) || include.isEmpty()) {
/*
* Must set `include` and `exclude`
- 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 runAop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private Future<Envelop> runAop(final Envelop envelop, final JsonObject matrix, final EmAop.Effect phase,
final Supplier<Future<Envelop>> executor) {
/*
* 检查 seeker:
* 理论上,如果是Zero Extension内部调用,由于之前做了seeker检查(DataRegion中)
- 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 deeply nested control flow statements. Open
if (maxIdx < valueLength) {
final JsonObject value = columnValue.getJsonObject(maxIdx);
/*
* children field
*/
Method runPlugin
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private <P extends DataPlugin<P>, T> Future<T> runPlugin(final P plugin, final T input, final JsonObject options) {
final JsonObject optionData = Ox.pluginOptions(plugin.getClass(), options);
if (plugin instanceof BeforePlugin) {
// Run Before
final BeforePlugin runner = (BeforePlugin) plugin;
- 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"