silentbalanceyh/vertx-zero

View on GitHub
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamClientRequest.java

Summary

Maintainability
D
2 days
Test Coverage

File StreamClientRequest.java has 455 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: zero.stream.proto

package io.vertx.mod.ipc.eon;

    StreamClientRequest has 31 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public final class StreamClientRequest extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:io.vertx.mod.ipc.eon.StreamClientRequest)
        StreamClientRequestOrBuilder {
        // Use StreamClientRequest.newBuilder() to construct.

      Builder has 29 methods (exceeds 20 allowed). Consider refactoring.
      Open

          public static final class Builder extends
              com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
              // @@protoc_insertion_point(builder_implements:io.vertx.mod.ipc.eon.StreamClientRequest)
              io.vertx.mod.ipc.eon.StreamClientRequestOrBuilder {
              public static final com.google.protobuf.Descriptors.Descriptor

        Method equals has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            @java.lang.Override
            public boolean equals(final java.lang.Object obj) {
                if (obj == this) {
                    return true;
                }

        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 4 locations. Consider refactoring.
        Open

                            case 10: {
                                io.vertx.mod.ipc.eon.IpcEnvelop.Builder subBuilder = null;
                                if (envelop_ != null) {
                                    subBuilder = envelop_.toBuilder();
                                }
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 49..61
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 65..77
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 84..96

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

        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 Builder mergeEnvelop(io.vertx.mod.ipc.eon.IpcEnvelop value) {
                    if (envelopBuilder_ == null) {
                        if (envelop_ != null) {
                            envelop_ =
                                io.vertx.mod.ipc.eon.IpcEnvelop.newBuilder(envelop_).mergeFrom(value).buildPartial();
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 640..654
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1044..1058
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1219..1233

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

        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 Builder setEnvelop(io.vertx.mod.ipc.eon.IpcEnvelop value) {
                    if (envelopBuilder_ == null) {
                        if (value == null) {
                            throw new NullPointerException();
                        }
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 600..612
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1012..1024
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1187..1199

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

        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 Builder clearEnvelop() {
                    if (envelopBuilder_ == null) {
                        envelop_ = null;
                        onChanged();
                    } else {
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 663..673
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1063..1073
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1238..1248

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

        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.IpcEnvelopOrBuilder getEnvelopOrBuilder() {
                    if (envelopBuilder_ != null) {
                        return envelopBuilder_.getMessageOrBuilder();
                    } else {
                        return envelop_ == null ?
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 695..702
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1087..1094
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1262..1269

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

        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.IpcEnvelop getEnvelop() {
                    if (envelopBuilder_ == null) {
                        return envelop_ == null ? io.vertx.mod.ipc.eon.IpcEnvelop.getDefaultInstance() : envelop_;
                    } else {
                        return envelopBuilder_.getMessage();
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 585..591
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1001..1007
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1176..1182

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

        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 Builder setEnvelop(
                    io.vertx.mod.ipc.eon.IpcEnvelop.Builder builderForValue) {
                    if (envelopBuilder_ == null) {
                        envelop_ = builderForValue.build();
                        onChanged();
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 621..631
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1029..1039
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 1204..1214

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

        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

                if (hasEnvelop()) {
                    hash = (37 * hash) + ENVELOP_FIELD_NUMBER;
                    hash = (53 * hash) + getEnvelop().hashCode();
                }
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/IpcResponse.java on lines 297..300
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 351..354
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 357..360

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

        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

        There are no issues that match your filters.

        Category
        Status