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

package io.vertx.mod.rbac.authorization.direct;

import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.Amalgam;
import io.vertx.mod.rbac.authorization.Assembler;
vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/direct/GdCritical.java on lines 1..55

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

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

    static JsonObject diffPull(
        final JsonObject recordO, final JsonObject recordN,
        final DataAtom atom, final Set<String> ignoreSet
    ) {
        final JsonArray queueN = new JsonArray().add(recordN);
vertx-pin/zero-atom/src/main/modulat/io/vertx/mod/atom/refine/AoCompare.java on lines 99..114

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

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

    static JsonObject diffPure(
        final JsonObject recordO, final JsonObject recordN,
        final DataAtom atom, final Set<String> ignoreSet
    ) {
        final JsonArray queueN = new JsonArray().add(recordN);
vertx-pin/zero-atom/src/main/modulat/io/vertx/mod/atom/refine/AoCompare.java on lines 424..439

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

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.direct;

import io.vertx.core.json.JsonObject;
import io.vertx.mod.rbac.authorization.Amalgam;
import io.vertx.mod.rbac.authorization.Assembler;
vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/direct/GdOverlook.java on lines 1..54

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

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

    public static <T> Object toSupport(final T input) {
        try {
            Object reference = null;
            if (null != input) {
                Saber saber;

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

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

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

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

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

                    @Override
                    public default IPBuyOrder 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::setType,json::getString,"TYPE","java.lang.String");

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

                  public IxWeb build(final Envelop envelop) {
                      /*
                       *  All the apis support the first parameter of actor
                       *  Here we create the first module ( active module )
                       */

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

                /*
                 * This file is generated by jOOQ.
                 */
                package cn.vertxup.graphic.domain;
                
                
                vertx-pin/zero-is/src/main/java/cn/vertxup/integration/domain/Db.java on lines 1..73

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

                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

                    static JsonObject aiOut(final JsonObject out, final BMapping mapping, final boolean keepNil) {
                        if (Objects.isNull(mapping)) {
                            /*
                             * No mapping
                             */
                vertx-gaia/vertx-co/src/main/java/io/vertx/up/util/Value.java on lines 271..298

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

                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.plugin.history;
                
                import io.horizon.uca.cache.Cc;
                import io.vertx.core.Vertx;
                import io.vertx.up.annotations.Infusion;
                vertx-ifx/zero-ifx-neo4j/src/main/java/io/vertx/up/plugin/neo4j/Neo4jInfix.java on lines 1..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 106.

                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.plugin.neo4j;
                
                import io.horizon.uca.cache.Cc;
                import io.vertx.core.Vertx;
                import io.vertx.up.annotations.Infusion;
                vertx-ifx/zero-ifx-history/src/main/java/io/vertx/up/plugin/history/TrashInfix.java on lines 1..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 106.

                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

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

                /*
                 * This file is generated by jOOQ.
                 */
                package cn.vertxup.integration.domain;
                
                
                vertx-pin/zero-graphic/src/main/java/cn/vertxup/graphic/domain/Db.java on lines 1..73

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

                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

                    static JsonObject aiIn(final JsonObject in, final BMapping mapping, final boolean keepNil) {
                        if (Objects.isNull(mapping)) {
                            /*
                             * No mapping
                             */
                vertx-gaia/vertx-co/src/main/java/io/vertx/up/util/Value.java on lines 300..323

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

                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 media has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    static void media(final HttpServerResponse response, final Set<MediaType> produces) {
                        /*
                         * Response head already sent
                         */
                        if (!response.headWritten()) {

                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

                Method parseFull has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    static Date parseFull(final String literal) {
                        if (Objects.isNull(literal)) {
                            return null;
                        } else {
                            // Datetime parsing
                Severity: Minor
                Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/TPeriod.java - About 1 hr to fix

                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

                Method read has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    static InputStream read(final String filename,
                                            final Class<?> clazz) {
                        final String root = IoPath.root();
                        LOG.io(INFO.IoStream.__FILE_ROOT, root, filename);
                        /*
                Severity: Minor
                Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/IoStream.java - About 1 hr to fix

                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

                Severity
                Category
                Status
                Source
                Language