hackedteam/core-blackberry

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

Summary

Maintainability
F
6 days
Test Coverage

File EvaluationSimplifier.java has 685 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)

    EvaluationSimplifier has 27 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class EvaluationSimplifier
    extends      SimplifiedVisitor
    implements   AttributeVisitor,
                 InstructionVisitor
    {

      Method visitSimpleInstruction has 72 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_IALOAD:

        Method visitVariableInstruction has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)
            {
                int variableIndex = variableInstruction.variableIndex;
        
                switch (variableInstruction.opcode)

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

              private void insertPopInstructions(int offset, int popCount)
              {
                  switch (popCount)
                  {
                      case 0:

            Method replaceFloatPushInstruction has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void replaceFloatPushInstruction(Clazz       clazz,
                                                         int         offset,
                                                         Instruction instruction,
                                                         int         maxVariableIndex)
                {

              Method replaceDoublePushInstruction has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private void replaceDoublePushInstruction(Clazz       clazz,
                                                            int         offset,
                                                            Instruction instruction,
                                                            int         maxVariableIndex)
                  {

                Method replaceLongPushInstruction has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private void replaceLongPushInstruction(Clazz       clazz,
                                                            int         offset,
                                                            Instruction instruction,
                                                            int         maxVariableIndex)
                    {

                  Method replaceIntegerPushInstruction has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private void replaceIntegerPushInstruction(Clazz       clazz,
                                                                 int         offset,
                                                                 Instruction instruction,
                                                                 int         maxVariableIndex)
                      {

                    Method replaceFloatPushInstruction has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private void replaceFloatPushInstruction(Clazz       clazz,
                                                                 int         offset,
                                                                 Instruction instruction,
                                                                 int         maxVariableIndex)
                        {

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

                        private void replaceDoublePushInstruction(Clazz       clazz,
                                                                  int         offset,
                                                                  Instruction instruction,
                                                                  int         maxVariableIndex)
                        {

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

                        private void replaceLongPushInstruction(Clazz       clazz,
                                                                int         offset,
                                                                Instruction instruction,
                                                                int         maxVariableIndex)
                        {

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

                        private void replaceIntegerPushInstruction(Clazz       clazz,
                                                                   int         offset,
                                                                   Instruction instruction,
                                                                   int         maxVariableIndex)
                        {

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

                        private void replaceBranchInstruction(Clazz       clazz,
                                                              int         offset,
                                                              Instruction instruction)
                        {
                            InstructionOffsetValue branchTargets = partialEvaluator.branchTargets(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 visitSimpleInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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

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

                          private void replaceConstantPushInstruction(Clazz       clazz,
                                                                      int         offset,
                                                                      Instruction instruction,
                                                                      byte        replacementOpcode,
                                                                      int         value)

                        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 visitConstantInstruction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

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

                                public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction)

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

                                  private void replaceVariablePushInstruction(Clazz       clazz,
                                                                              int         offset,
                                                                              Instruction instruction,
                                                                              byte        replacementOpcode,
                                                                              int         variableIndex)

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

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

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

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

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

                                          else if (pushedValue.isSpecific())
                                          {
                                              TracedVariables variables = partialEvaluator.getVariablesBefore(offset);
                                              for (int variableIndex = 0; variableIndex < maxVariableIndex; variableIndex++)
                                              {
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 520..534
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 589..603
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 657..671

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

                                  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

                                          else if (pushedValue.isSpecific())
                                          {
                                              TracedVariables variables = partialEvaluator.getVariablesBefore(offset);
                                              for (int variableIndex = 0; variableIndex < maxVariableIndex; variableIndex++)
                                              {
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 453..467
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 589..603
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 657..671

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

                                  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

                                          else if (pushedValue.isSpecific())
                                          {
                                              TracedVariables variables = partialEvaluator.getVariablesBefore(offset);
                                              for (int variableIndex = 0; variableIndex < maxVariableIndex; variableIndex++)
                                              {
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 453..467
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 520..534
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 589..603

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

                                  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

                                          else if (pushedValue.isSpecific())
                                          {
                                              TracedVariables variables = partialEvaluator.getVariablesBefore(offset);
                                              for (int variableIndex = 0; variableIndex < maxVariableIndex; variableIndex++)
                                              {
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 453..467
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 520..534
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 657..671

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

                                  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)
                                          {
                                              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/EvaluationShrinker.java on lines 144..152

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

                                              {
                                                  ConstantPoolEditor constantPoolEditor =
                                                      new ConstantPoolEditor((ProgramClass)clazz);
                                  
                                                  Instruction replacementInstruction =
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 509..518
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 578..587
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 646..655

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

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

                                              {
                                                  ConstantPoolEditor constantPoolEditor =
                                                      new ConstantPoolEditor((ProgramClass)clazz);
                                  
                                                  Instruction replacementInstruction =
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 442..451
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 578..587
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 646..655

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

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

                                              {
                                                  ConstantPoolEditor constantPoolEditor =
                                                      new ConstantPoolEditor((ProgramClass)clazz);
                                  
                                                  Instruction replacementInstruction =
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 442..451
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 509..518
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 646..655

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

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

                                              {
                                                  ConstantPoolEditor constantPoolEditor =
                                                      new ConstantPoolEditor((ProgramClass)clazz);
                                  
                                                  Instruction replacementInstruction =
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 442..451
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 509..518
                                  bb-tools/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java on lines 578..587

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

                                  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/EvaluationShrinker.java on lines 1477..1483

                                  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

                                  There are no issues that match your filters.

                                  Category
                                  Status