connectbot/sshlib

View on GitHub
src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java

Summary

Maintainability
F
3 days
Test Coverage
F
0%

File AuthAgentForwardThread.java has 456 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright 2007 Kenny Root, Jeffrey Sharkey
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
Severity: Minor
Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 6 hrs to fix

    Method addIdentity has 101 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private void addIdentity(TypesReader tr, boolean checkConstraints) {
            try
            {
                if (failWhenLocked())
                    return;
    Severity: Major
    Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 4 hrs to fix

      Method run has 96 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Override
          public void run()
          {
              try
              {
      Severity: Major
      Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 3 hrs to fix

        Method addIdentity has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
        Open

            private void addIdentity(TypesReader tr, boolean checkConstraints) {
                try
                {
                    if (failWhenLocked())
                        return;
        Severity: Minor
        Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 3 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 run has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            public void run()
            {
                try
                {
        Severity: Minor
        Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.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 processSignRequest has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private void processSignRequest(TypesReader tr)
            {
                try
                {
                    if (failWhenLocked())
        Severity: Major
        Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 2 hrs to fix

          Method processSignRequest has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

              private void processSignRequest(TypesReader tr)
              {
                  try
                  {
                      if (failWhenLocked())
          Severity: Minor
          Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.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

          Avoid too many return statements within this method.
          Open

                          return;
          Severity: Major
          Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                    return;
            Severity: Major
            Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return;
              Severity: Major
              Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 30 mins to fix

                Method removeIdentity has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    private void removeIdentity(TypesReader tr) {
                        try
                        {
                            if (failWhenLocked())
                                return;
                Severity: Minor
                Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 25 mins 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 removeAllIdentities has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    private void removeAllIdentities(TypesReader tr) {
                        try
                        {
                            if (failWhenLocked())
                                return;
                Severity: Minor
                Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 25 mins 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

                There are no issues that match your filters.

                Category
                Status