silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

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

        @Override
        public default ISPath 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 inspectView has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private Future<JsonObject> inspectView(final JsonObject requestData, final ScResource resource,
                                               final JsonObject response) {
            final String habitus = requestData.getString(KName.HABITUS);
            final String keyView = resource.keyView();
            final ScUser user = ScUser.login(habitus);

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

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

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

                  @Override
                  public default IXAttachment 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::setExtension,json::getString,"EXTENSION","java.lang.String");

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

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

                Method toJson has 27 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 toJson has 27 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("SERIAL",getSerial());

                    Method umBook has 27 lines of code (exceeds 25 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)) {

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

                            @Override
                            public Future<JsonArray> fetchPayment(final String settlementId, final boolean tree) {
                                return Ux.Jooq.on(FPaymentItemDao.class)
                                    .<FPaymentItem>fetchAsync(FmCv.ID.SETTLEMENT_ID, settlementId).compose(items -> {
                                        if (tree) {

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

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

                              Method connect has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  static void connect(final Model model,
                                                      final Function<Schema, BiConsumer<MField, MAttribute>> consumer) {
                                      /*
                                       * 1. 遍历当前模型中的 Schema
                                       * 2. 二层遍历当前模型中的 Attribute

                                Method diffPure has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    static ConcurrentMap<ChangeFlag, JsonArray> diffPure(
                                        final JsonArray queueO, final JsonArray queueN,
                                        final DataAtom atom, final Set<String> ignoreSet
                                    ) {
                                        final HRule rules = atom.ruleSmart();

                                  Method build has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      @SuppressWarnings("unchecked")
                                      static Future<Envelop> build(final ExceptionSupplier<Object> supplier,
                                                                   final Class<?> target,
                                                                   final Method method) {
                                          final Object returnValue = invoke(supplier, target, method);

                                    Method buildPartial has 27 lines of code (exceeds 25 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_;

                                      Method syncSuccess has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private static void syncSuccess(
                                              final RoutingContext context,
                                              final org.apache.http.HttpResponse clientResponse
                                          ) {
                                              final StatusLine line = clientResponse.getStatusLine();

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

                                            interface Argument {
                                        
                                                String BAG_ARGUMENT = Prefix._EVENT + "X-BAG/ARGUMENT/FETCH";
                                        
                                                String BAG_ARGUMENT_VALUE = Prefix._EVENT + "X-BAG/ARGUMENT/FETCH/VALUE";
                                        vertx-pin/zero-ambient/src/main/modulat/io/vertx/mod/ambient/cv/Addr.java on lines 78..91
                                        vertx-pin/zero-fm/src/main/modulat/io/vertx/mod/fm/cv/Addr.java on lines 10..19
                                        vertx-pin/zero-fm/src/main/modulat/io/vertx/mod/fm/cv/Addr.java on lines 21..34

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

                                        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