hackedteam/core-blackberry

View on GitHub
bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java

Summary

Maintainability
D
2 days
Test Coverage

File ProgramClassWriter.java has 425 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)

    AttributeBodyWriter has 29 methods (exceeds 20 allowed). Consider refactoring.
    Open

        private class AttributeBodyWriter
        extends       SimplifiedVisitor
        implements    AttributeVisitor,
                      BootstrapMethodInfoVisitor,
                      InnerClassesInfoVisitor,

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

              public void visitUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedType uninitializedType)
      Severity: Minor
      Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                public void visitLessZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LessZeroFrame lessZeroFrame)
        Severity: Minor
        Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                  public void visitSameZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameZeroFrame sameZeroFrame)
          Severity: Minor
          Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                    public void visitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame)
            Severity: Minor
            Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                      public void visitObjectType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ObjectType objectType)
              Severity: Minor
              Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                        public void visitFullFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FullFrame fullFrame)
                Severity: Minor
                Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                          public void visitAnyStackMapFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, StackMapFrame stackMapFrame)
                  Severity: Minor
                  Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                            public void visitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame)
                    Severity: Minor
                    Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                              public void visitAnyVerificationType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationType verificationType)
                      Severity: Minor
                      Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                                public void visitAnyVerificationType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationType verificationType)
                        Severity: Minor
                        Found in bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java - About 35 mins to fix

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

                                  public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)
                                  {
                                      dataOutput.writeShort(localVariableInfo.u2startPC);
                                      dataOutput.writeShort(localVariableInfo.u2length);
                                      dataOutput.writeShort(localVariableInfo.u2nameIndex);
                          bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java on lines 558..565

                          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

                                  public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)
                                  {
                                      dataOutput.writeShort(localVariableTypeInfo.u2startPC);
                                      dataOutput.writeShort(localVariableTypeInfo.u2length);
                                      dataOutput.writeShort(localVariableTypeInfo.u2nameIndex);
                          bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java on lines 546..553

                          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

                              public void visitProgramField(ProgramClass programClass, ProgramField programField)
                              {
                                  // Write the general field information.
                                  dataOutput.writeShort(programField.u2accessFlags);
                                  dataOutput.writeShort(programField.u2nameIndex);
                          bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java on lines 135..146

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

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

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

                              public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
                              {
                                  // Write the general method information.
                                  dataOutput.writeShort(programMethod.u2accessFlags);
                                  dataOutput.writeShort(programMethod.u2nameIndex);
                          bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java on lines 121..132

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

                          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

                                  public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
                                  {
                                      dataOutput.writeShort(innerClassesInfo.u2innerClassIndex);
                                      dataOutput.writeShort(innerClassesInfo.u2outerClassIndex);
                                      dataOutput.writeShort(innerClassesInfo.u2innerNameIndex);
                          bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java on lines 514..520

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

                                  public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo)
                                  {
                                      dataOutput.writeShort(exceptionInfo.u2startPC);
                                      dataOutput.writeShort(exceptionInfo.u2endPC);
                                      dataOutput.writeShort(exceptionInfo.u2handlerPC);
                          bb-tools/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java on lines 503..509

                          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

                          There are no issues that match your filters.

                          Category
                          Status