silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

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

            if (Ut.isJArray(input)) {
                final JsonArray data = (JsonArray) input;
                // Required
                Insurer reference = CC_INSURER.pick(RequiredInsurer::new, "A-Required");
                // Fn.po?lThread(POOL_INSURER, RequiredInsurer::new, "A-Required");
vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/Ruler.java on lines 115..129

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

                    case 26: {
                        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/StreamClientRequest.java on lines 47..59
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

                    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/StreamClientRequest.java on lines 47..59
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 2 locations. Consider refactoring.
Open

        return jooqAttr.<MAttribute>fetchAsync(criteria).compose(original -> {
            // 3. 唯一业务属性
            final Set<String> uniqueSet = new HashSet<>();
            uniqueSet.add(KName.MODEL_ID);
            uniqueSet.add(KName.NAME);
vertx-pin/zero-atom/src/main/jib/io/horizon/spi/ambient/ModelRefine.java on lines 122..130

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

            } else {
                final JsonObject data = (JsonObject) input;
                // Required
                Insurer reference = CC_INSURER.pick(RequiredInsurer::new, "J-Required");
                // Fn.po?lThread(POOL_INSURER, RequiredInsurer::new, "J-Required");
vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/Ruler.java on lines 101..115

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

                    case 42: {
                        io.vertx.mod.ipc.eon.IpcStatus.Builder subBuilder = null;
                        if (responseStatus_ != null) {
                            subBuilder = responseStatus_.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/StreamClientRequest.java on lines 47..59
vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/ipc/eon/StreamServerRequest.java on lines 65..77

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

Method extract has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private Event extract(final Method method, final String root) {
        // 1.Method path
        final Event event = new Event();
        // 2.Method resolve
        final HttpMethod httpMethod = MethodResolver.resolve(method);

    Method generate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        static String generate(final String packageName, final String className, final int length) {
            final KPair pair = HUt.randomRsa(length);
            // PRIVATE_KEY
            final List<String> source = new ArrayList<>();
            source.add("package " + packageName + ";");
    Severity: Minor
    Found in vertx-gaia/vertx-ams/src/main/jib/io/horizon/spi/cloud/HED.java - About 1 hr to fix

      Method invokeAsync has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          static <T> Future<T> invokeAsync(final Object instance,
                                           final Method method,
                                           final Object... args) {
              /*
               * Analyzing method returnType first
      Severity: Minor
      Found in vertx-gaia/vertx-co/src/main/java/io/vertx/up/util/Invoker.java - About 1 hr to fix

        Method transform has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private Frame transform(final Message<Object> msg, final Subscription subscription, final Object bodyData) {
                final String messageId = UUID.randomUUID().toString();
        
                final Frame frame = new Frame();
                frame.setCommand(Command.MESSAGE);

          Method fetchControl has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              public Future<JsonObject> fetchControl(final ControlType controlType, final JsonObject params) {
                  /*
                   * The first step to fetch UI_VISITOR record.
                   * {

            Method from has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public void from(IECustomer from) {
                    setKey(from.getKey());
                    setName(from.getName());
                    setCode(from.getCode());

              Method toString has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public String toString() {
                      StringBuilder sb = new StringBuilder("EProject (");
              
                      sb.append(key);

                Method hashCode has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Override
                    public int hashCode() {
                        final int prime = 31;
                        int result = 1;
                        result = prime * result + ((this.key == null) ? 0 : this.key.hashCode());

                  Method from has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Override
                      public void from(IECustomer from) {
                          setKey(from.getKey());
                          setName(from.getName());
                          setCode(from.getCode());

                    Method toJson has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            @Override
                            public default io.vertx.core.json.JsonObject toJson() {
                                    io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
                                    json.put("KEY",getKey());
                                    json.put("NAME",getName());

                      Method from has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          @Override
                          public void from(IIService from) {
                              setKey(from.getKey());
                              setNamespace(from.getNamespace());
                              setName(from.getName());

                        Method toJson has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                @Override
                                public default io.vertx.core.json.JsonObject toJson() {
                                        io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
                                        json.put("KEY",getKey());
                                        json.put("NAME",getName());

                          Method from has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              @Override
                              public void from(IIService from) {
                                  setKey(from.getKey());
                                  setNamespace(from.getNamespace());
                                  setName(from.getName());

                            Method jwtToken has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                static Future<Boolean> jwtToken(final List<OAccessToken> item, final String userId) {
                                    WebException error = null;
                                    if (null == item) {
                                        // Token Size
                                        LOG.Auth.info(LOGGER, AuthMsg.TOKEN_SIZE_NULL, item, userId);
                              Severity
                              Category
                              Status
                              Source
                              Language