hackedteam/core-blackberry

View on GitHub

Showing 1,573 of 2,662 total issues

File InstructionSequenceConstants.java has 3575 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)

    Method createAttribute has a Cognitive Complexity of 231 (exceeds 5 allowed). Consider refactoring.
    Open

        private Attribute createAttribute(Clazz clazz)
        {
            int u2attributeNameIndex = dataInput.readUnsignedShort();
            int u4attributeLength    = dataInput.readInt();
            String attributeName     = clazz.getString(u2attributeNameIndex);
    Severity: Minor
    Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassReader.java - About 4 days 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

    File EvaluationShrinker.java has 1370 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)

      Method requiredAccessFlags has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring.
      Open

          private int requiredAccessFlags(boolean set,
                                          String  access)
          throws BuildException
          {
              int accessFlags = 0;
      Severity: Minor
      Found in bb-tools/proguard4.7/src/proguard/ant/MemberSpecificationElement.java - About 3 days 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

      File ProGuardGUI.java has 1253 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/gui/ProGuardGUI.java - About 3 days to fix

        Method parseMemberSpecificationArguments has a Cognitive Complexity of 157 (exceeds 5 allowed). Consider refactoring.
        Open

            private void parseMemberSpecificationArguments(String             externalClassName,
                                                           ClassSpecification classSpecification)
            throws ParseException, IOException
            {
                // Clear the annotation name.
        Severity: Minor
        Found in bb-tools/proguard4.7/src/proguard/ConfigurationParser.java - About 3 days 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 execute has 616 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public boolean execute(ClassPool programClassPool,
                                   ClassPool libraryClassPool) throws IOException
            {
                // Check if we have at least some keep commands.
                if (configuration.keep         == null &&
        Severity: Major
        Found in bb-tools/proguard4.7/src/proguard/optimize/Optimizer.java - About 3 days to fix

          IntegerValue has 120 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public abstract class IntegerValue extends Category1Value
          {
              /**
               * Returns the specific integer value, if applicable.
               */
          Severity: Major
          Found in bb-tools/proguard4.7/src/proguard/evaluation/value/IntegerValue.java - About 2 days to fix

            SimplifiedVisitor has 120 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public abstract class SimplifiedVisitor
            {
                // Simplifications for ClassVisitor.
            
                /**

              File ConfigurationParser.java has 873 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/ConfigurationParser.java - About 2 days to fix

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

                    private static boolean parse(XMLTokener x, JSONObject context, String name)
                            throws JSONException {
                        char c;
                        int i;
                        String n;
                Severity: Minor
                Found in RCSBlackBerry/src/rpc/json/me/util/XML.java - About 2 days 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 visitCodeAttribute0 has a Cognitive Complexity of 98 (exceeds 5 allowed). Consider refactoring.
                Open

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

                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 PartialEvaluator.java has 787 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)

                  Method fixDupInstruction has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private void fixDupInstruction(Clazz         clazz,
                                                     CodeAttribute codeAttribute,
                                                     int           dupOffset,
                                                     Instruction   instruction)
                      {

                  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 Instruction.java has 779 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)

                    Method visitSimpleInstruction has 364 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
                        {
                            switch (simpleInstruction.opcode)
                            {
                                case InstructionConstants.OP_NOP:
                    Severity: Major
                    Found in bb-tools/proguard4.7/src/proguard/evaluation/Processor.java - About 1 day to fix

                      OverrideGraphics2D has 90 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      final class OverrideGraphics2D extends Graphics2D
                      {
                          private final Graphics2D graphics;
                      
                          private Color  overrideColor;
                      Severity: Major
                      Found in bb-tools/proguard4.7/src/proguard/gui/splash/OverrideGraphics2D.java - About 1 day to fix

                        File Optimizer.java has 715 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/optimize/Optimizer.java - About 1 day to fix

                          File ClassPrinter.java has 710 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/classfile/visitor/ClassPrinter.java - About 1 day to fix

                            Method evaluateSingleInstructionBlock has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private void evaluateSingleInstructionBlock(Clazz            clazz,
                                                                            Method           method,
                                                                            CodeAttribute    codeAttribute,
                                                                            TracedVariables  variables,
                                                                            TracedStack      stack,

                            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