silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

Method umBook has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    static List<FBook> umBook(final KNaming spec, final List<FBook> books) {
        Objects.requireNonNull(books);
        // Read the major book
        final FBook found = books.stream().filter(FBook::getMajor).findFirst().orElse(null);
        if (Objects.isNull(found)) {
Severity: Minor
Found in vertx-pin/zero-fm/src/main/modulat/io/vertx/mod/fm/refine/FmBook.java - About 45 mins to fix

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 updateLeaf has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @SuppressWarnings("all")
    static Future<IDirectory> updateLeaf(final JsonArray directoryA, final JsonObject params) {
        // Query all directory here;
        final List<IDirectory> directories = Ux.fromJson(directoryA, IDirectory.class);
        final List<String> storePath = Ut.toList(params.getJsonArray(KName.STORE_PATH));
Severity: Minor
Found in vertx-pin/zero-is/src/main/modulat/io/vertx/mod/is/refine/IsDir.java - About 45 mins to fix

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 combine has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private static void combine(final HRecord record, final String field, final ConcurrentMap<String, JAmb> groupData, final RResult result) {
        /* Key */
        final String keyRecord = keyRecord(record, result.joined());
        /* Combined */
        final JAmb amb = groupData.get(keyRecord);

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 add has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Fluent
    public DataMatrix add(final MField field,
                          final MAttribute attribute,
                          final Object value) {
        if (null == field || null == attribute) {

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 outValue has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public Object outValue(final Object input) {
        if (Objects.isNull(input)) {
            return null;
        } else {

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 8 (exceeds 5 allowed). Consider refactoring.
Open

    static Field field(final String field, final Set<DataMatrix> matrixSet,
                       final ConcurrentMap<String, String> fieldMap) {
        final DataMatrix matrix = matrixSet.stream()
            .filter(item -> item.getAttributes().contains(field))
            .findFirst().orElse(null);

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 connecting has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public IxMod connecting(final Object input) {
        if (Objects.isNull(input)) {
            return null;
        }
        /*

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

    static KModule get(final String actor) {
        final KModule config = CONFIG_MAP.get(actor);
        if (Objects.isNull(config)) {
            final String name = ALIAS_MAP.get(actor);
            if (Ut.isNotNil(name)) {
Severity: Minor
Found in vertx-pin/zero-crud/src/main/modulat/io/vertx/mod/crud/init/_IxDao.java - About 45 mins to fix

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 clear has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        public Builder clear() {
            super.clear();
            responseType_ = 0;

            if (responseParamsBuilder_ == null) {

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 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public String analyze(final JsonObject arguments) {
        /* Extract arguments by Orbit.ARGX */
        final String uri = arguments.getString(ARG0);
        final String requestUri = arguments.getString(ARG1);
Severity: Minor
Found in vertx-pin/zero-crud/src/main/jib/io/horizon/spi/web/ExActorOrbit.java - About 45 mins to fix

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 writeTo has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public void writeTo(final com.google.protobuf.CodedOutputStream output)
        throws java.io.IOException {
        if (this.responseFormat_ != io.vertx.mod.ipc.eon.em.Format.BINARY.getNumber()) {
            output.writeEnum(1, this.responseFormat_);

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 buildPartial has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        public io.vertx.mod.ipc.eon.StreamServerRequest buildPartial() {
            io.vertx.mod.ipc.eon.StreamServerRequest result = new io.vertx.mod.ipc.eon.StreamServerRequest(this);
            int from_bitField0_ = bitField0_;
            int to_bitField0_ = 0;
            result.responseType_ = responseType_;

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

Identical blocks of code found in 4 locations. Consider refactoring.
Open

    @Override
    public final boolean isInitialized() {
        final byte isInitialized = this.memoizedIsInitialized;
        if (isInitialized == 1) {
            return true;
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcEnvelop.java on lines 333..345
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcRequest.java on lines 439..451
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerResponse.java on lines 214..226

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 55.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

    @Override
    public final boolean isInitialized() {
        final byte isInitialized = this.memoizedIsInitialized;
        if (isInitialized == 1) {
            return true;
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcRequest.java on lines 439..451
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcStatus.java on lines 247..259
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerResponse.java on lines 214..226

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 55.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

    @Override
    public final boolean isInitialized() {
        final byte isInitialized = this.memoizedIsInitialized;
        if (isInitialized == 1) {
            return true;
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcEnvelop.java on lines 333..345
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcRequest.java on lines 439..451
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcStatus.java on lines 247..259

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 55.

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

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        public io.vertx.mod.ipc.eon.em.Compression getAlgorithm() {
            io.vertx.mod.ipc.eon.em.Compression result = io.vertx.mod.ipc.eon.em.Compression.valueOf(algorithm_);
            return result == null ? io.vertx.mod.ipc.eon.em.Compression.UNRECOGNIZED : result;
        }
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 138..141
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 220..223
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 699..702

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 55.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        @Override
        public io.vertx.mod.ipc.eon.IpcStatus getResponseStatus() {
            if (this.responseStatusBuilder_ == null) {
                return this.responseStatus_ == null ? io.vertx.mod.ipc.eon.IpcStatus.getDefaultInstance() : this.responseStatus_;
            } else {
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcRequest.java on lines 1045..1052
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerResponse.java on lines 494..501

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 55.

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

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    public io.vertx.mod.ipc.eon.em.Compression getAlgorithm() {
        io.vertx.mod.ipc.eon.em.Compression result = io.vertx.mod.ipc.eon.em.Compression.valueOf(algorithm_);
        return result == null ? io.vertx.mod.ipc.eon.em.Compression.UNRECOGNIZED : result;
    }
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 138..141
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 699..702
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1134..1137

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 55.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        @Override
        public io.vertx.mod.ipc.eon.IpcStatusOrBuilder getResponseStatusOrBuilder() {
            if (this.responseStatusBuilder_ != null) {
                return this.responseStatusBuilder_.getMessageOrBuilder();
            } else {
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcRequest.java on lines 1156..1164
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerResponse.java on lines 581..589

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 55.

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

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

    @Override
    public final boolean isInitialized() {
        final byte isInitialized = this.memoizedIsInitialized;
        if (isInitialized == 1) {
            return true;
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcEnvelop.java on lines 333..345
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcStatus.java on lines 247..259
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerResponse.java on lines 214..226

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 55.

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

Further Reading

Severity
Category
Status
Source
Language