silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

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

package io.vertx.up.uca.jooq;

import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import org.jooq.impl.DSL;
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorAvg.java on lines 1..36
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorMax.java on lines 1..35
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorMin.java on lines 1..35

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

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.mod.rbac.authorization.detent;

import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.ScDetent;
import io.vertx.mod.rbac.logged.ProfileGroup;
vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/detent/ScDetentParent.java on lines 1..32

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

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.mod.rbac.authorization.detent;

import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.ScDetent;
import io.vertx.mod.rbac.logged.ProfileGroup;
vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/detent/ScDetentChild.java on lines 1..33

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

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

package io.vertx.up.uca.jooq;

import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import org.jooq.impl.DSL;
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorAvg.java on lines 1..36
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorMin.java on lines 1..35
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorSum.java on lines 1..36

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

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

package io.vertx.up.uca.jooq;

import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import org.jooq.impl.DSL;
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorAvg.java on lines 1..36
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorMax.java on lines 1..35
vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/AggregatorSum.java on lines 1..36

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

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

    @SuppressWarnings("all")
    static <T> Future<JsonArray> toArrayFuture(
        final String pojo,
        final CompletableFuture<List<T>> completableFuture
    ) {
vertx-gaia/vertx-up/src/main/java/io/vertx/up/unity/Async.java on lines 107..125

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

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

    @SuppressWarnings("all")
    static <T> Future<JsonObject> toJsonFuture(
        final String pojo,
        final CompletableFuture<T> completableFuture
    ) {
vertx-gaia/vertx-up/src/main/java/io/vertx/up/unity/Async.java on lines 127..145

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

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

    static Class<?> clazz(final String name, final Class<?> instanceCls, final ClassLoader loader) {
        if (TIs.isNil(name)) {
            return instanceCls;
        } else {

Severity: Minor
Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/HInstance.java - About 1 hr to fix

    Method toJson has 46 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());

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

      package io.modello.dynamic.modular.reference;
      
      import io.modello.specification.HRecord;
      import io.vertx.core.Future;
      import io.vertx.core.json.JsonArray;
      vertx-pin/zero-atom/src/main/modeler/io/modello/dynamic/modular/reference/RaySingle.java on lines 1..42

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

      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.modello.dynamic.modular.reference;
      
      import io.modello.specification.HRecord;
      import io.vertx.core.Future;
      import io.vertx.core.json.JsonArray;
      vertx-pin/zero-atom/src/main/modeler/io/modello/dynamic/modular/reference/RayBatch.java on lines 1..42

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

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

          <T> Set<T> saveEntity(final JsonArray data, final ExTable table) {
              final Set<T> resultSet = new HashSet<>();
              if (Objects.nonNull(table.classPojo()) && Objects.nonNull(table.classDao())) {
                  try {
                      final JsonObject filters = table.whereAncient(data);

        Method mappingsBuilder has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Map<String, Object> mappingsBuilder(final ConcurrentMap<String, Class<?>> mappings) {
                final Map<String, Object> properties = new HashMap<>();
        
                // process field: key
                if (mappings.containsKey("key")) {

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

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

            Method inBook has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public Future<Boolean> inBook(final List<FBillItem> items, final Set<String> closedKeys) {
                    // Collect bill ids from items
                    final Set<String> billKeys = items.stream()
                        .map(FBillItem::getBillId)

              Method executeAsync has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public Future<JsonObject> executeAsync(final JsonObject input) {
                      final JsonObject normalized = new JsonObject();
                      /*
                       * query processing

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

                    @Override
                    public void from(IWTodo from) {
                        setKey(from.getKey());
                        setSerial(from.getSerial());
                        setName(from.getName());

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

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

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

                          @Override
                          public void from(IWTodo from) {
                              setKey(from.getKey());
                              setSerial(from.getSerial());
                              setName(from.getName());
                        Severity
                        Category
                        Status
                        Source
                        Language