silentbalanceyh/vertx-zero

View on GitHub
vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java

Summary

Maintainability
D
2 days
Test Coverage

File ServerStompHandler.java has 438 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package io.vertx.up.plugin.stomp.socket;

import io.horizon.uca.log.Annal;
import io.vertx.core.*;
import io.vertx.core.impl.ContextInternal;

    ServerStompHandler has 42 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class ServerStompHandler implements ServerWsHandler {
    
        private static final Annal LOGGER = Annal.get(ServerStompHandler.class);
        private final Vertx vertx;
        private final Context context;

      Method handle has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Override
          public void handle(final ServerFrame serverFrame) {
              final Frame frame = serverFrame.frame();
              final StompServerConnection connection = serverFrame.connection();
              connection.onServerActivity();

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

            @Override
            public StompServerHandler onAck(final StompServerConnection connection, final Frame subscription, final List<Frame> messages) {
                final Handler<Acknowledgement> handler;
                synchronized (this) {
                    handler = this.onAckHandler;
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 481..491

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

        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 StompServerHandler onNack(final StompServerConnection connection, final Frame subscribe, final List<Frame> messages) {
                final Handler<Acknowledgement> handler;
                synchronized (this) {
                    handler = this.onNackHandler;
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 469..479

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

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

            private void handleAck(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.ackHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleDisconnect(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.disconnectHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295

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

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

            private void handleSubscribe(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.subscribeHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleNack(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.nackHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleCommit(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.commitHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleSend(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.sendHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleBegin(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.beginHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleAbort(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.abortHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 276..284
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

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

            private void handleUnsubscribe(final Frame frame, final StompServerConnection connection) {
                final Handler<ServerFrame> handler;
                synchronized (this) {
                    handler = this.unsubscribeHandler;
                }
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 216..224
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 226..234
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 236..244
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 246..254
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 256..264
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 266..274
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 286..295
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 323..331

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

        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

                final long pong = Frame.Heartbeat.computePongPeriod(
                    Frame.Heartbeat.create(connection.server().options().getHeartbeat()),
                    Frame.Heartbeat.parse(frame.getHeader(Frame.HEARTBEAT)));
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 308..310

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

        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

                final long ping = Frame.Heartbeat.computePingPeriod(
                    Frame.Heartbeat.create(connection.server().options().getHeartbeat()),
                    Frame.Heartbeat.parse(frame.getHeader(Frame.HEARTBEAT)));
        vertx-ifx/zero-ifx-stomp/src/main/java/io/vertx/up/plugin/stomp/socket/ServerStompHandler.java on lines 311..313

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

        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

        There are no issues that match your filters.

        Category
        Status