Showing 9,050 of 9,050 total issues
Method read
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("all")
<T> T read(final String key) {
/*
* Async convert to type
*/
- 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 initSync
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static JsonObject initSync(final String name, final JsonObject options) {
if (!CLIENTS_SYNC.containsKey(name)) {
final String host = options.getString(YmlCore.redis.HOST);
final Integer port = options.getInteger(YmlCore.redis.PORT);
// Fix New Version Issue
- 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 itRow
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static void itRow(final Row row,
final ExBound bound,
final BiConsumer<Cell, Integer> consumer,
final Predicate<Cell> predicate) {
final int start = bound.getStart();
- 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 checkMatches
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private boolean checkMatches(final boolean inbound, final String address, final Object body) {
final List<PermittedOptions> matches = inbound ? this.options.getInboundPermitteds() : this.options.getOutboundPermitteds();
for (final PermittedOptions matchHolder : matches) {
- 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 values
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public TOaTrainingRecord values(String value1, String value2, LocalDateTime value3, LocalDateTime value4, String value5, String value6, String value7, String value8, String value9, String value10) {
Method analyzeRegion
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static RegionType analyzeRegion(final JsonObject reference) {
/* Extract Data Object */
final Object value = reference.getValue("data");
if (Objects.nonNull(value)) {
if (Ut.isJArray(value)) {
- 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 values
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public OAccessTokenRecord values(String value1, byte[] value2, byte[] value3, Long value4, byte[] value5, String value6, Boolean value7, String value8, LocalDateTime value9, String value10) {
Method adjust
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
static XNumber adjust(final XNumber number, final Integer count) {
final boolean renewal = !Objects.isNull(number.getRenewal()) && number.getRenewal();
final int step = Objects.isNull(number.getStep()) ? 1 : number.getStep();
final long adjust = (long) count * step;
final boolean decrement = Objects.isNull(number.getDecrement()) || number.getDecrement();
- 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 normalize
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Object normalize(final Kv<String, Object> kv, final HRecord record, final JsonObject combineData) {
final String cat3Key;
final String cat2Key;
final String cat3Identifier;
final String cat2Identifier;
- 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 transferIn
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Future<Apt> transferIn(final ActIn request) {
/*
* 导入专用
*/
- 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 zipData
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void zipData(final BiConsumer<String, String> joinFn) {
final KJoin connect = this.module.getConnect();
// Source Key
final String sourceKey;
- 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 build
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public IxWeb build(final Envelop envelop) {
/*
* All the apis support the first parameter of actor
* Here we create the first module ( active module )
*/
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
package io.vertx.up.backbone.regular;
import io.horizon.eon.VValue;
import io.horizon.exception.WebException;
import io.vertx.up.atom.Rule;
- 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 85.
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 2 locations. Consider refactoring. Open
package io.vertx.up.backbone.regular;
import io.horizon.eon.VValue;
import io.horizon.exception.WebException;
import io.vertx.up.atom.Rule;
- 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 85.
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 module
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("all")
public AbstractModule module(final ConcurrentMap<Class<I>, Set<Class<T>>> tree,
final Set<Class<T>> flat) {
final Set<Class<?>> classes = this.pointers;
Method toParameter
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
static Object toParameter(final Envelop envelop, final Class<?> type,
final Mission mission, final Refer underway) {
if (Envelop.class == type) {
/*
* Envelop
Method registryServer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void registryServer(final HttpServerOptions options,
final Router router) {
final Integer port = options.getPort();
final AtomicInteger out = ZeroOption.ATOMIC_LOG.get(port);
if (VValue.ZERO == out.getAndIncrement()) {
Method buildExpressionFactory
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static ExpressionFactory buildExpressionFactory() {
if (canLoadExpressionFactory()) {
final ExpressionFactory expressionFactory = ELManager.getExpressionFactory();
LOGGER.debug("Loaded expression factory via original TCCL");
return expressionFactory;
Method extractDynamic
has 31 lines of code (exceeds 25 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 {