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

        return "Database{" +
            "hostname='" + this.hostname + '\'' +
            ", instance='" + this.instance + '\'' +
            ", port=" + this.port +
            ", category=" + this.category +
vertx-gaia/vertx-co/src/main/java/io/vertx/up/atom/shape/KPoint.java on lines 196..204

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

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

package io.vertx.up.boot.anima;

import io.horizon.uca.log.Annal;
import io.macrocosm.specification.config.HConfig;
import io.vertx.core.DeploymentOptions;
vertx-gaia/vertx-rx/src/main/java/io/vertx/rx/web/anima/AgentScatter.java on lines 1..38

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

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 exportData has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    void exportData(final String identifier, final JsonArray data,
                    final HMetaAtom metaAtom, final Handler<AsyncResult<Buffer>> handler) {
        /*
         * 1. Workbook created first
         * Each time if you want to export the data to excel file, here you must create

    Method hashCode has 34 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 toString has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method fromJson has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                @Override
                public default IECustomer fromJson(io.vertx.core.json.JsonObject json) {
                        setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
                        setOrThrow(this::setName,json::getString,"NAME","java.lang.String");
                        setOrThrow(this::setCode,json::getString,"CODE","java.lang.String");

          Method hashCode has 34 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 toString has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method configure has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public Future<JsonObject> configure(final BBag bag, final ConcurrentMap<String, BBag> map) {
                      final JsonObject uiConfig = Ut.toJObject(bag.getUiConfig());
                      final JsonObject formConfig = Ut.visitJObject(uiConfig, KName.CONFIG, "_form");
                      // ui capture

                Method fromJson has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        @Override
                        public default IIService fromJson(io.vertx.core.json.JsonObject json) {
                                setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
                                setOrThrow(this::setNamespace,json::getString,"NAMESPACE","java.lang.String");
                                setOrThrow(this::setName,json::getString,"NAME","java.lang.String");

                  Method transferIn has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      @Override
                      public Future<Apt> transferIn(final ActIn request) {
                          /*
                           * 导入专用
                           */

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

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

                      Method hashCode has 34 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 toJson has 34 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 hashCode has 34 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 toString has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

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

                                  @Override
                                  public Future<JsonObject> insertAsync(final JsonObject params, final MetaInstance metadata) {
                                      final JsonArray rData = params.getJsonArray(KName.RECORD, new JsonArray());
                              
                                      final ActionOn action = ActionOn.action(metadata.recordMode());
                              vertx-pin/zero-wf/src/main/modulat/io/vertx/mod/workflow/uca/modeling/RegisterJ.java on lines 16..27

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

                              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

                                  @Override
                                  public Future<JsonObject> insertAsync(final JsonObject params, final MetaInstance metadata) {
                                      final JsonObject rData = params.getJsonObject(KName.RECORD, new JsonObject());
                              
                                      final ActionOn action = ActionOn.action(metadata.recordMode());
                              vertx-pin/zero-wf/src/main/modulat/io/vertx/mod/workflow/uca/modeling/RegisterA.java on lines 16..27

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

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

                                      return jooqJoin.<MJoin>fetchAsync(criteria).compose(original -> {
                                          // 3. 唯一性业务
                                          final Set<String> uniqueSet = new HashSet<>();
                                          uniqueSet.add(KName.NAMESPACE);
                                          uniqueSet.add(KName.MODEL);
                              vertx-pin/zero-atom/src/main/jib/io/horizon/spi/ambient/ModelRefine.java on lines 94..102

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language