hackedteam/core-blackberry

View on GitHub

Showing 2,662 of 2,662 total issues

Consider simplifying this complex logical expression.
Open

        if (!programClass.equals(targetClass) &&

            // Don't merge classes that must be preserved.
            !KeepMarker.isKept(programClass) &&
            !KeepMarker.isKept(targetClass)  &&
Severity: Critical
Found in bb-tools/proguard4.7/src/proguard/optimize/peephole/ClassMerger.java - About 1 day to fix

    Method parse has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

        public void parse(Configuration configuration)
        throws ParseException, IOException
        {
            while (nextWord != null)
            {
    Severity: Minor
    Found in bb-tools/proguard4.7/src/proguard/ConfigurationParser.java - About 1 day 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 requiredAccessFlags has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

        private int requiredAccessFlags(boolean set,
                                        String  access,
                                        String  type)
        throws BuildException
        {
    Severity: Minor
    Found in bb-tools/proguard4.7/src/proguard/ant/ClassSpecificationElement.java - About 1 day 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 create has 230 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static Instruction create(byte[] code, int offset)
        {
            Instruction instruction;
    
            int  index  = offset;

      ConstantPoolRemapper has 63 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class ConstantPoolRemapper
      extends      SimplifiedVisitor
      implements   ClassVisitor,
                   ConstantVisitor,
                   MemberVisitor,

        Method internalType has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String internalType(String externalType)
            {
                // Strip the array part, if any.
                int dimensionCount = externalArrayTypeDimensionCount(externalType);
                if (dimensionCount > 0)
        Severity: Minor
        Found in bb-tools/proguard4.7/src/proguard/classfile/util/ClassUtil.java - About 1 day 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

        UsageMarker has 62 methods (exceeds 20 allowed). Consider refactoring.
        Open

        class      UsageMarker
        extends    SimplifiedVisitor
        implements ClassVisitor,
                   MemberVisitor,
                   ConstantVisitor,
        Severity: Major
        Found in bb-tools/proguard4.7/src/proguard/shrink/UsageMarker.java - About 1 day to fix

          ProgramClassReader has 62 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class ProgramClassReader
          extends      SimplifiedVisitor
          implements   ClassVisitor,
                       MemberVisitor,
                       ConstantVisitor,

            Method visitCodeAttribute has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
            Open

                public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
                {
            //        DEBUG =
            //            clazz.getName().equals("abc/Def") &&
            //            method.getName(clazz).equals("abc");

            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 UsageMarker.java has 533 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * ProGuard -- shrinking, optimization, obfuscation, and preverification
             *             of Java bytecode.
             *
             * Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
            Severity: Major
            Found in bb-tools/proguard4.7/src/proguard/shrink/UsageMarker.java - About 1 day to fix

              Method printDynamicInvocationNote has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
              Open

                  private void printDynamicInvocationNote(Clazz                      clazz,
                                                          InstructionSequenceMatcher noteSequenceMatcher,
                                                          boolean                    isField,
                                                          boolean                    isDeclared,
                                                          String                     defaultName,

              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

              LongValue has 60 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public abstract class LongValue extends Category2Value
              {
                  /**
                   * Returns the specific long value, if applicable.
                   */
              Severity: Major
              Found in bb-tools/proguard4.7/src/proguard/evaluation/value/LongValue.java - About 1 day to fix

                ParticularIntegerValue has 60 methods (exceeds 20 allowed). Consider refactoring.
                Open

                final class ParticularIntegerValue extends SpecificIntegerValue
                {
                    private final int value;
                
                
                

                  Method compareTo has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public int compareTo(Object object)
                      {
                          LocalVariableTypeInfo other = (LocalVariableTypeInfo)object;
                  
                          return

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

                      public int compareTo(Object object)
                      {
                          LocalVariableInfo other = (LocalVariableInfo)object;
                  
                          return

                  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 ModuleMessage.java has 522 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  //#preprocess
                  /* *************************************************
                   * Copyright (c) 2010 - 2010
                   * HT srl,   All rights reserved.
                   * Project      : RCS, RCSBlackBerry
                  Severity: Major
                  Found in RCSBlackBerry/src/blackberry/module/ModuleMessage.java - About 1 day to fix

                    Method visitCodeAttribute0 has 211 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public void visitCodeAttribute0(Clazz clazz, Method method, CodeAttribute codeAttribute)
                        {
                            if (DEBUG_RESULTS)
                            {
                                System.out.println();

                      SpecificIntegerValue has 58 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      abstract class SpecificIntegerValue extends IntegerValue
                      {
                          // Implementations of unary methods of IntegerValue.
                      
                          public IntegerValue negate()

                        Method execute has 207 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public void execute(ClassPool programClassPool,
                                                ClassPool libraryClassPool) throws IOException
                            {
                                int originalLibraryClassPoolSize = libraryClassPool.size();
                        
                        
                        Severity: Major
                        Found in bb-tools/proguard4.7/src/proguard/Initializer.java - About 1 day to fix

                          File ModulePosition.java has 508 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          //#preprocess
                          /* *************************************************
                           * Copyright (c) 2010 - 2010
                           * HT srl,   All rights reserved.
                           * Project      : RCS, RCSBlackBerry
                          Severity: Major
                          Found in RCSBlackBerry/src/blackberry/module/ModulePosition.java - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language