hackedteam/core-blackberry

View on GitHub
bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java

Summary

Maintainability
F
2 wks
Test Coverage

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

    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

    Method visitAnyInstruction has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
    Open

            public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
            {
                // Has the instruction been marked?
                if (isInstructionNecessary(offset))
                {

    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 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();

      Method fixDupInstruction has 191 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method isVariableInitializationNecessary has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
        Open

            private boolean isVariableInitializationNecessary(Clazz         clazz,
                                                              Method        method,
                                                              CodeAttribute codeAttribute,
                                                              int           initializationOffset,
                                                              int           variableIndex)

        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

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

        public class EvaluationShrinker
        extends      SimplifiedVisitor
        implements   AttributeVisitor
        {
            //*

          Method insertPopInstructions has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
          Open

              private void insertPopInstructions(int offset, boolean replace, int popCount)
              {
                  // Mark this instruction.
                  markInstruction(offset);
          
          

          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 visitAnyInstruction has 102 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
                  {
                      // Has the instruction been marked?
                      if (isInstructionNecessary(offset))
                      {

            Method insertPopInstructions has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void insertPopInstructions(int offset, boolean replace, int popCount)
                {
                    // Mark this instruction.
                    markInstruction(offset);
            
            

              Method initializeNecessary has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  private void initializeNecessary(CodeAttribute codeAttribute)
                  {
                      int codeLength = codeAttribute.u4codeLength;
                      int maxLocals  = codeAttribute.u2maxLocals;
                      int maxStack   = codeAttribute.u2maxStack;

              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 initializeNecessary has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private void initializeNecessary(CodeAttribute codeAttribute)
                  {
                      int codeLength = codeAttribute.u4codeLength;
                      int maxLocals  = codeAttribute.u2maxLocals;
                      int maxStack   = codeAttribute.u2maxStack;

                Method visitSimpleInstruction has 46 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_DUP:

                  Method isVariableInitializationNecessary has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private boolean isVariableInitializationNecessary(Clazz         clazz,
                                                                        Method        method,
                                                                        CodeAttribute codeAttribute,
                                                                        int           initializationOffset,
                                                                        int           variableIndex)

                    Method isAllSmallerThanOrEqual has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private boolean isAllSmallerThanOrEqual(InstructionOffsetValue instructionOffsets,
                                                                int                    instructionOffset)
                        {
                            if (instructionOffsets != null)
                            {

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

                        private boolean isAnyLargerThan(InstructionOffsetValue instructionOffsets,
                                                        int                    instructionOffset)
                        {
                            if (instructionOffsets != null)
                            {

                    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 deeply nested control flow statements.
                    Open

                                                if (isAnyStackEntryNecessaryAfter(producerOffsets, top - stackIndex))
                                                {
                                                    // Make sure it is pushed after all producers.
                                                    markStackEntriesAfter(producerOffsets, top - stackIndex);
                                                }

                      Method visitProgramMethod has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
                              {
                                  // Get the total size of the parameters.
                                  int parameterSize = ParameterUsageMarker.getParameterSize(programMethod);
                      
                      

                      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 deeply nested control flow statements.
                      Open

                                              if (simpleProducer != null)
                                              {
                                                  InstructionOffsetValue producerOffsets =
                                                      producer.instructionOffsetValue();
                                                  InstructionOffsetValue simpleProducerOffsets =

                        Method visitVariableInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)

                          Method visitSimpleInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)

                            Method visitBranchInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction)

                              Method visitSimpleInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)

                                Method isVariableInitializationNecessary has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    private boolean isVariableInitializationNecessary(Clazz         clazz,
                                                                                      Method        method,
                                                                                      CodeAttribute codeAttribute,
                                                                                      int           initializationOffset,
                                                                                      int           variableIndex)

                                  Method visitAnyInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)

                                    Method visitConstantInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)

                                      Method visitAnyInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) {}

                                        Method visitAnyInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                                public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)

                                          Method visitVariableInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                                  public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)

                                            Method visitConstantInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                    public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)

                                              Method visitAnyInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                      public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction) {}

                                                Method markStraddlingBranches has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private void markStraddlingBranches(int                    instructionOffset,
                                                                                        InstructionOffsetValue branchOffsets,
                                                                                        boolean                isPointingToTargets)
                                                    {
                                                        if (branchOffsets != null)

                                                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

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

                                                    public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
                                                    {
                                                //        DEBUG = DEBUG_RESULTS =
                                                //            clazz.getName().equals("abc/Def") &&
                                                //            method.getName(clazz).equals("abc");
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 92..120

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

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

                                                        if (stacksNecessaryAfter.length    < codeLength ||
                                                            stacksNecessaryAfter[0].length < maxStack)
                                                        {
                                                            stacksNecessaryAfter = new boolean[codeLength][maxStack];
                                                        }
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1667..1678
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1693..1704

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

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

                                                        if (stacksSimplifiedBefore.length    < codeLength ||
                                                            stacksSimplifiedBefore[0].length < maxStack)
                                                        {
                                                            stacksSimplifiedBefore = new boolean[codeLength][maxStack];
                                                        }
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1667..1678
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1680..1691

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

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

                                                        if (variablesNecessaryAfter.length    < codeLength ||
                                                            variablesNecessaryAfter[0].length < maxLocals)
                                                        {
                                                            variablesNecessaryAfter = new boolean[codeLength][maxLocals];
                                                        }
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1680..1691
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1693..1704

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

                                                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

                                                    private void markVariableAfter(int instructionOffset,
                                                                                   int variableIndex)
                                                    {
                                                        if (!isVariableNecessaryAfter(instructionOffset, variableIndex))
                                                        {
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1956..1970

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

                                                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

                                                    private void markStackEntryAfter(int instructionOffset,
                                                                                     int stackIndex)
                                                    {
                                                        if (!isStackEntryNecessaryAfter(instructionOffset, stackIndex))
                                                        {
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1837..1851

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

                                                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

                                                            case 2:
                                                            {
                                                                // Replace or insert a single pop2 instruction.
                                                                Instruction popInstruction =
                                                                    new SimpleInstruction(InstructionConstants.OP_POP2);
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1421..1441

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

                                                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

                                                            case 1:
                                                            {
                                                                // Replace or insert a single pop instruction.
                                                                Instruction popInstruction =
                                                                    new SimpleInstruction(InstructionConstants.OP_POP);
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1442..1462

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

                                                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

                                                    private void markVariableProducers(InstructionOffsetValue producerOffsets,
                                                                                       int                    variableIndex)
                                                    {
                                                        if (producerOffsets != null)
                                                        {
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 991..1007

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

                                                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

                                                    private void markStackEntryProducers(InstructionOffsetValue producerOffsets,
                                                                                         int                    stackIndex)
                                                    {
                                                        if (producerOffsets != null)
                                                        {
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 899..915

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

                                                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

                                                        if (DEBUG_RESULTS)
                                                        {
                                                            System.out.println();
                                                            System.out.println("Class "+ClassUtil.externalClassName(clazz.getName()));
                                                            System.out.println("Method "+ClassUtil.externalFullMethodDescription(clazz.getName(),
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 125..133

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

                                                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

                                                                {
                                                                    codeAttributeEditor.insertAfterInstruction(offset, popInstructions);
                                                
                                                                    for (int index = 0; index < popInstructions.length; index++)
                                                                    {
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1486..1496

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

                                                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

                                                                {
                                                                    codeAttributeEditor.replaceInstruction(offset, popInstructions);
                                                
                                                                    for (int index = 1; index < popInstructions.length; index++)
                                                                    {
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1498..1508

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

                                                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

                                                    private boolean isAnyStackEntryNecessaryAfter(InstructionOffsetValue instructionOffsets,
                                                                                                  int                    stackIndex)
                                                    {
                                                        int offsetCount = instructionOffsets.instructionOffsetCount();
                                                
                                                
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1878..1893

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

                                                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

                                                    private boolean isVariableNecessaryAfterAny(InstructionOffsetValue instructionOffsetValue,
                                                                                                int                    variableIndex)
                                                    {
                                                        int count = instructionOffsetValue.instructionOffsetCount();
                                                
                                                
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1980..1994

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

                                                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

                                                                        if (stackEntriesPresent01)
                                                                        {
                                                                            // Copy the original element.
                                                                            newOpcode = (byte)(InstructionConstants.OP_DUP2 + skipCount);
                                                                        }
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1229..1238

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

                                                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

                                                                        if (stackEntriesPresent01)
                                                                        {
                                                                            // Copy the original element.
                                                                            newOpcode = (byte)(InstructionConstants.OP_DUP2 + skipCount);
                                                                        }
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 1261..1270

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

                                                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

                                                                case InstructionConstants.OP_DUP2:
                                                                    conditionallyMarkStackEntryProducers(offset, 0, 0);
                                                                    conditionallyMarkStackEntryProducers(offset, 1, 1);
                                                                    conditionallyMarkStackEntryProducers(offset, 2, 0);
                                                                    conditionallyMarkStackEntryProducers(offset, 3, 1);
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 574..579

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

                                                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

                                                                case InstructionConstants.OP_DUP_X2:
                                                                    conditionallyMarkStackEntryProducers(offset, 0, 0);
                                                                    conditionallyMarkStackEntryProducers(offset, 1, 1);
                                                                    conditionallyMarkStackEntryProducers(offset, 2, 2);
                                                                    conditionallyMarkStackEntryProducers(offset, 3, 0);
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 580..585

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

                                                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

                                                                if (popCount % 2 == 1)
                                                                {
                                                                    popInstruction =
                                                                        new SimpleInstruction(InstructionConstants.OP_POP);
                                                
                                                
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 959..965

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

                                                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

                                                                    if (expectedPopCount > 0)
                                                                    {
                                                                        if (DEBUG) System.out.println("  Replacing unmarked consumer "+instruction.toString(offset));
                                                
                                                                        insertPopInstructions(offset, true, expectedPopCount);
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 778..783

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

                                                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

                                                                    if (requiredPopCount > 0)
                                                                    {
                                                                        if (DEBUG) System.out.println("  Inserting after marked producer "+instruction.toString(offset));
                                                
                                                                        insertPopInstructions(offset, false, requiredPopCount);
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java on lines 818..823

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

                                                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

                                                    private boolean isAnyInstructionNecessary(int instructionOffset1,
                                                                                              int instructionOffset2)
                                                    {
                                                        for (int instructionOffset = instructionOffset1;
                                                             instructionOffset < instructionOffset2;
                                                bb-tools/proguard4.7/src/proguard/optimize/evaluation/PartialEvaluator.java on lines 321..332

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

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

                                                        if (instructionsNecessary.length < codeLength)
                                                        {
                                                            instructionsNecessary = new boolean[codeLength];
                                                        }
                                                        else
                                                bb-tools/proguard4.7/src/proguard/classfile/editor/VariableEditor.java on lines 56..65
                                                bb-tools/proguard4.7/src/proguard/optimize/info/VariableUsageMarker.java on lines 65..74
                                                bb-tools/proguard4.7/src/proguard/optimize/peephole/ReachableCodeMarker.java on lines 88..97

                                                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

                                                                            if (DEBUG)
                                                                            {
                                                                                System.out.println("  ["+offset+"] producers ["+producerOffsets+"], simple producers ["+simpleProducerOffsets+"]");
                                                                            }
                                                bb-tools/proguard4.7/src/proguard/preverify/CodeSubroutineInliner.java on lines 192..195

                                                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