hackedteam/core-blackberry

View on GitHub

Showing 2,662 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

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

              public void decrypt(final byte[] ct, final byte[] pt) {
                  /*
                   * map byte array block to cipher state and add initial round key:
                   */
                  int k = 0, v;
          Severity: Major
          Found in RCSBlackBerry/src/blackberry/crypto/Rijndael.java and 1 other location - About 2 days to fix
          RCSBlackBerry/src/blackberry/crypto/Rijndael.java on lines 327..388

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

          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

              public void encrypt(final byte[] pt, final byte[] ct) {
                  /*
                   * map byte array block to cipher state and add initial round key:
                   */
                  int k = 0, v;
          Severity: Major
          Found in RCSBlackBerry/src/blackberry/crypto/Rijndael.java and 1 other location - About 2 days to fix
          RCSBlackBerry/src/blackberry/crypto/Rijndael.java on lines 204..265

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

          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

          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.
            
                /**

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

              //#preprocessor
              package blackberry.utils;
              
              import java.util.Vector;
              
              Severity: Major
              Found in InjectionFramework/src/blackberry/utils/StringUtils.java and 1 other location - About 2 days to fix
              RCSBlackBerry/src/blackberry/utils/StringUtils.java on lines 1..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 1099.

              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

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

              //#preprocess
              
              /* *************************************************
               * Copyright (c) 2010 - 2012
               * HT srl,   All rights reserved.
              Severity: Major
              Found in RCSBlackBerry/src/blackberry/utils/StringUtils.java and 1 other location - About 2 days to fix
              InjectionFramework/src/blackberry/utils/StringUtils.java on lines 1..302

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

              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

              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
                      Severity
                      Category
                      Status
                      Source
                      Language