silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

Method values has 17 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public XActivityChangeRecord values(String value1, String value2, String value3, String value4, String value5, String value6, String value7, String value8, String value9, String value10, String value11, Boolean value12, String value13, LocalDateTime value14, String value15, LocalDateTime value16, String value17) {

    Method values has 17 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public PCommodityHisRecord values(String value1, String value2, String value3, String value4, Integer value5, Integer value6, BigDecimal value7, BigDecimal value8, String value9, Boolean value10, String value11, String value12, String value13, LocalDateTime value14, String value15, LocalDateTime value16, String value17) {

      Method dictionary has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private Future<Kv<String, JsonObject>> dictionary(final String expression) {
              final String[] segments = expression.split(",");
              if (5 <= segments.length) {
                  final String filename = segments[0];
                  final ExcelClient client = ExcelInfix.createClient();

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

        package io.vertx.mod.plugin.etcd.unit;
        
        import io.horizon.uca.log.Annal;
        import io.vertx.core.json.JsonObject;
        import io.vertx.mod.plugin.etcd.Enrol;
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/plugin/etcd/unit/JArrayEnrol.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 136.

        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.plugin.etcd.unit;
        
        import io.horizon.uca.log.Annal;
        import io.vertx.core.json.JsonArray;
        import io.vertx.core.json.JsonObject;
        vertx-semper/aeon-eternal/aeon-inlet/src/main/java/io/vertx/mod/plugin/etcd/unit/JObjectEnrol.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 136.

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

            private void registryServer(final HttpServerOptions options,
                                        final Router router) {
                final Integer port = options.getPort();
                final AtomicInteger out = ZeroOption.ATOMIC_LOG.get(port);
                if (VValue.ZERO == out.getAndIncrement()) {

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

            static <T> T toFile(final FileUpload fileUpload, final Class<?> expected, final Function<String, Buffer> consumer) {
                final String filename = fileUpload.uploadedFileName();
                if (FileUpload.class.isAssignableFrom(expected)) {
                    /*
                     * FileUpload ( interface )
        Severity: Minor
        Found in vertx-gaia/vertx-up/src/main/java/io/vertx/up/unity/Upload.java - About 2 hrs 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 putField has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            private static void putField(final JsonObject data, final Mojo mojo,
                                         final String field, final Object value) {
                /*
                 * Early Loading, when the data contains the pick up field, ignore the rest
                 * It means that we used the T1 table data as the major data
        Severity: Minor
        Found in vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/util/JqOut.java - About 2 hrs 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 columnName has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            private String columnName(final String field) {
                String targetField;
                if (null == this.pojo) {
                    /*
                     * The mapping is
        Severity: Minor
        Found in vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/JqAnalyzer.java - About 2 hrs 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 to has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            public Short to(final Object value, final Class<?> type) {
                if (Objects.isNull(value)) {
                    /*
                     * -1 as default

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

            @SuppressWarnings("unchecked")
            static <T> T get(final JsonObject data, final Class<?> clazz, final Integer index) {
                T reference = null;
                if (data.containsKey(VName.DATA)) {
                    final Object rawData = data.getValue(VName.DATA);

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

            @Override
            public Float to(final Object value, final Class<?> type) {
                if (Objects.isNull(value)) {
        
                    return -1.0f;

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

            @Override
            @SuppressWarnings("all")
            public Long to(final Object value, final Class<?> type) {
                if (Objects.isNull(value)) {
                    /*
        Severity: Minor
        Found in vertx-gaia/vertx-ams/src/main/jib/io/horizon/uca/convert/LongVto.java - About 2 hrs 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 to has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            public Integer to(final Object value, final Class<?> type) {
                if (Objects.isNull(value)) {
                    /*
                     * -1 as default
        Severity: Minor
        Found in vertx-gaia/vertx-ams/src/main/jib/io/horizon/uca/convert/IntVto.java - About 2 hrs 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 aiExecute has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            @SuppressWarnings("unchecked")
            private static Object aiExecute(final Class<?> sourceType, final Class<?> targetType, final Object input,
                                            final Function<Object, Object> addonFn) {
        
                if (Instant.class == targetType) {
        Severity: Minor
        Found in vertx-gaia/vertx-co/src/main/java/io/vertx/up/util/Value.java - About 2 hrs 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 aeonParseLine has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            private int aeonParseLine(final URL u, final BufferedReader r, final int lc, final Set<String> names)
                throws IOException {
                String ln = r.readLine();
                if (ln == null) {
                    return -1;

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

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

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

            @Override
            public String to(final Object value) {
                final String[] pathArr = value.toString().split(VString.COLON);
                String literal = value.toString();
                if (2 == pathArr.length) {

        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 jwtToken has a Cognitive Complexity of 16 (exceeds 5 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);

        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

        File PBuyOrderDao.java has 253 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * This file is generated by jOOQ.
         */
        package cn.vertxup.psi.domain.tables.daos;
        
        
          Severity
          Category
          Status
          Source
          Language